Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/helper-transform-fixture-test-runner

Package Overview
Dependencies
Maintainers
6
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-transform-fixture-test-runner - npm Package Compare versions

Comparing version 7.12.13 to 7.12.17

41

lib/index.js

@@ -104,3 +104,3 @@ "use strict";

function runModuleInTestContext(id, relativeFilename, context, moduleCache) {
const filename = (parseFloat(process.versions.node) >= 8.9 ? require.resolve : (r, {
const filename = (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, {
paths: [b]

@@ -302,22 +302,19 @@ }, M = require("module")) => {

const toEqualFile = () => ({
compare: (actual, {
filename,
code
}) => {
const pass = actual === code;
return {
pass,
message: () => {
const diffString = (0, _jestDiff.default)(code, actual, {
expand: false
});
return `Expected ${filename} to match transform output.\n` + `To autogenerate a passing version of this file, delete the file and re-run the tests.\n\n` + `Diff:\n\n${diffString}`;
}
};
},
negativeCompare: () => {
throw new Error("Negation unsupported");
}
});
const toEqualFile = (actual, {
filename,
code
}) => {
const pass = actual === code;
return {
pass,
message: pass ? () => {
throw new Error(".toEqualFile does not support negation");
} : () => {
const diffString = (0, _jestDiff.default)(code, actual, {
expand: false
});
return `Expected ${filename} to match transform output.\n` + `To autogenerate a passing version of this file, delete the file and re-run the tests.\n\n` + `Diff:\n\n${diffString}`;
}
};
};

@@ -332,3 +329,3 @@ function _default(fixturesLoc, name, suiteOpts = {}, taskOpts = {}, dynamicOpts) {

describe(name + "/" + testSuite.title, function () {
jest.addMatchers({
expect.extend({
toEqualFile

@@ -335,0 +332,0 @@ });

{
"name": "@babel/helper-transform-fixture-test-runner",
"version": "7.12.13",
"version": "7.12.17",
"description": "Transform test runner for @babel/helper-fixtures module",

@@ -19,3 +19,3 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

"@babel/code-frame": "^7.12.13",
"@babel/core": "^7.12.13",
"@babel/core": "^7.12.17",
"@babel/helper-fixtures": "^7.12.13",

@@ -22,0 +22,0 @@ "babel-check-duplicated-nodes": "^1.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc