babel-plugin-tester
Advanced tools
Comparing version 6.2.0 to 6.2.1
@@ -403,3 +403,3 @@ "use strict"; | ||
})); | ||
expect(describeSpy).toHaveBeenCalledTimes(4); | ||
expect(describeSpy).toHaveBeenCalledTimes(5); | ||
expect(itSpy).toHaveBeenCalledTimes(8); | ||
@@ -773,2 +773,3 @@ expect(itSpy.mock.calls).toEqual([[`changed`, expect.any(Function)], [`nested a`, expect.any(Function)], [`nested b`, expect.any(Function)], [`typescript`, expect.any(Function)], [`unchanged`, expect.any(Function)], [`nested with option`, expect.any(Function)], [`nested without option`, expect.any(Function)], [`without output file`, expect.any(Function)]]); | ||
_asyncToGenerator(function* () { | ||
var optionRootFoo = jest.fn(); | ||
var optionFoo = jest.fn(); | ||
@@ -780,2 +781,6 @@ var optionBar = jest.fn(); | ||
Program(programPath, state) { | ||
if (state.opts.rootFoo === 'rootBar') { | ||
optionRootFoo(); | ||
} | ||
if (state.opts.foo === 'bar') { | ||
@@ -797,2 +802,3 @@ optionFoo(); | ||
})); | ||
expect(optionRootFoo).toHaveBeenCalledTimes(8); | ||
expect(optionFoo).toHaveBeenCalledTimes(2); | ||
@@ -799,0 +805,0 @@ expect(optionBar).toHaveBeenCalledTimes(1); |
@@ -240,2 +240,10 @@ "use strict"; | ||
var rootOptionsPath = _path.default.join(fixturesDir, 'options.json'); | ||
var rootFixtureOptions = {}; | ||
if (_pathExists.default.sync(rootOptionsPath)) { | ||
rootFixtureOptions = require(rootOptionsPath); | ||
} | ||
_fs.default.readdirSync(fixturesDir).forEach(function (caseName) { | ||
@@ -261,3 +269,3 @@ var fixtureDir = _path.default.join(fixturesDir, caseName); | ||
createFixtureTests(fixtureDir, _objectSpread({}, options, { | ||
pluginOptions: _objectSpread({}, options.pluginOptions, fixturePluginOptions) | ||
pluginOptions: _objectSpread({}, rootFixtureOptions, options.pluginOptions, fixturePluginOptions) | ||
})); | ||
@@ -284,3 +292,3 @@ }); | ||
babelOptions: { | ||
plugins: [[plugin, _objectSpread({}, pluginOptions, fixturePluginOptions)]], | ||
plugins: [[plugin, _objectSpread({}, rootFixtureOptions, pluginOptions, fixturePluginOptions)]], | ||
// if they have a babelrc, then we'll let them use that | ||
@@ -287,0 +295,0 @@ // otherwise, we'll just use our simple config |
@@ -1,1 +0,1 @@ | ||
{"name":"babel-plugin-tester","version":"6.2.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.merge":"^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.2.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.merge":"^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"} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64801
30
1180
4