UNPKG

only-changed-jest-watch-plugin

Version:

Jest watch plugin for running either only the modified test (for TDD), or tests of dependant modules

36 lines (24 loc) 631 B
# babel-plugin-jest-hoist Babel plugin to hoist `jest.disableAutomock`, `jest.enableAutomock`, `jest.unmock`, `jest.mock`, calls above `import` statements. This plugin is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). ## Installation ```sh $ yarn add --dev babel-plugin-jest-hoist ``` ## Usage ### Via `.babelrc` (Recommended) **.babelrc** ```json { "plugins": ["jest-hoist"] } ``` ### Via CLI ```sh $ babel --plugins jest-hoist script.js ``` ### Via Node API ```javascript require('babel-core').transform('code', { plugins: ['jest-hoist'], }); ```