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

babel-plugin-tester

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-tester - npm Package Compare versions

Comparing version 6.3.0 to 6.3.1

13

dist/__tests__/index.js

@@ -769,2 +769,15 @@ "use strict";

}));
test('works with a formatter adding a empty line',
/*#__PURE__*/
_asyncToGenerator(function* () {
// Simulate prettier adding an empty line at the end
var formatResultSpy = jest.fn(function (r) {
return `${r.trim()}\n\n`;
});
yield runPluginTester(getOptions({
fixtures: getFixturePath('fixtures'),
formatResult: formatResultSpy
}));
expect(formatResultSpy).toHaveBeenCalledTimes(9);
}));
test('gets options from options.json files when using fixtures',

@@ -771,0 +784,0 @@ /*#__PURE__*/

10

dist/index.js

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

try {
result = formatResult(babel.transform(code, babelOptions).code.trim());
result = formatResult(babel.transform(code, babelOptions).code);
} catch (err) {

@@ -206,3 +206,3 @@ if (error) {

} else {
_assert.default.equal(result, code, 'Expected output to not change, but it did');
_assert.default.equal(result.trim(), code.trim(), 'Expected output to not change, but it did');
}

@@ -308,3 +308,3 @@ }

var actual = formatResult(babel.transformFileSync(codePath, babelOptions).code.trim());
var actual = formatResult(babel.transformFileSync(codePath, babelOptions).code);

@@ -319,5 +319,5 @@ var outputPath = _path.default.join(fixtureDir, `${fixtureOutputName}${ext}`);

var output = _fs.default.readFileSync(outputPath, 'utf8').trim();
var output = _fs.default.readFileSync(outputPath, 'utf8');
_assert.default.equal(actual, output, `actual output does not match ${fixtureOutputName}${ext}`);
_assert.default.equal(actual.trim(), output.trim(), `actual output does not match ${fixtureOutputName}${ext}`);
});

@@ -324,0 +324,0 @@ });

@@ -1,1 +0,1 @@

{"name":"babel-plugin-tester","version":"6.3.0","description":"Utilities for testing babel plugins","main":"dist/index.js","engines":{"node":"> 4","npm":"> 3"},"scripts":{"add-contributor":"kcd-scripts contributors add","build":"kcd-scripts build","lint":"kcd-scripts lint","test":"kcd-scripts test","test:update":"npm test -- --updateSnapshot --coverage","validate":"kcd-scripts validate","precommit":"kcd-scripts pre-commit"},"files":["dist"],"keywords":[],"author":"Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)","license":"MIT","dependencies":{"common-tags":"^1.4.0","invariant":"^2.2.2","lodash.mergewith":"^4.6.0","path-exists":"^3.0.0","strip-indent":"^2.0.0"},"devDependencies":{"@babel/core":"^7.2.0","@babel/plugin-proposal-async-generator-functions":"^7.2.0","@babel/plugin-transform-async-to-generator":"^7.2.0","@babel/preset-env":"^7.2.0","kcd-scripts":"^0.49.0"},"peerDependencies":{"@babel/core":"^7.0.0"},"eslintConfig":{"extends":"./node_modules/kcd-scripts/eslint.js","rules":{"max-lines":0,"max-lines-per-function":0,"prefer-object-spread":0,"no-useless-catch":0,"babel/camelcase":0,"babel/valid-typeof":0,"babel/no-unused-expressions":0,"babel/quotes":0,"jest/prefer-todo":0}},"eslintIgnore":["node_modules","coverage","dist","fixtures"],"babel":{"presets":[["@babel/preset-env",{"targets":{"node":"4.5"},"exclude":["transform-regenerator"]}]],"plugins":["@babel/plugin-transform-async-to-generator","@babel/plugin-proposal-async-generator-functions","@babel/plugin-proposal-object-rest-spread"]},"prettier":{"printWidth":80,"bracketSpacing":false,"semi":false,"singleQuote":true,"trailingComma":"all"},"repository":{"type":"git","url":"https://github.com/babel-utils/babel-plugin-tester.git"},"bugs":{"url":"https://github.com/babel-utils/babel-plugin-tester/issues"},"homepage":"https://github.com/babel-utils/babel-plugin-tester#readme"}
{"name":"babel-plugin-tester","version":"6.3.1","description":"Utilities for testing babel plugins","main":"dist/index.js","engines":{"node":"> 4","npm":"> 3"},"scripts":{"add-contributor":"kcd-scripts contributors add","build":"kcd-scripts build","lint":"kcd-scripts lint","test":"kcd-scripts test","test:update":"npm test -- --updateSnapshot --coverage","validate":"kcd-scripts validate","precommit":"kcd-scripts pre-commit"},"files":["dist"],"keywords":[],"author":"Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)","license":"MIT","dependencies":{"common-tags":"^1.4.0","invariant":"^2.2.2","lodash.mergewith":"^4.6.0","path-exists":"^3.0.0","strip-indent":"^2.0.0"},"devDependencies":{"@babel/core":"^7.2.0","@babel/plugin-proposal-async-generator-functions":"^7.2.0","@babel/plugin-transform-async-to-generator":"^7.2.0","@babel/preset-env":"^7.2.0","kcd-scripts":"^0.49.0"},"peerDependencies":{"@babel/core":"^7.0.0"},"eslintConfig":{"extends":"./node_modules/kcd-scripts/eslint.js","rules":{"max-lines":0,"max-lines-per-function":0,"prefer-object-spread":0,"no-useless-catch":0,"babel/camelcase":0,"babel/valid-typeof":0,"babel/no-unused-expressions":0,"babel/quotes":0,"jest/prefer-todo":0}},"eslintIgnore":["node_modules","coverage","dist","fixtures"],"babel":{"presets":[["@babel/preset-env",{"targets":{"node":"4.5"},"exclude":["transform-regenerator"]}]],"plugins":["@babel/plugin-transform-async-to-generator","@babel/plugin-proposal-async-generator-functions","@babel/plugin-proposal-object-rest-spread"]},"prettier":{"printWidth":80,"bracketSpacing":false,"semi":false,"singleQuote":true,"trailingComma":"all"},"repository":{"type":"git","url":"https://github.com/babel-utils/babel-plugin-tester.git"},"bugs":{"url":"https://github.com/babel-utils/babel-plugin-tester/issues"},"homepage":"https://github.com/babel-utils/babel-plugin-tester#readme"}
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