babel-plugin-jest-hoist (27.5.1)
Published 2026-02-24 13:53:17 +00:00 by atheaadmin
Installation
registry=npm install babel-plugin-jest-hoist@27.5.1"babel-plugin-jest-hoist": "27.5.1"About this package
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.
Installation
$ yarn add --dev babel-plugin-jest-hoist
Usage
Via babel.config.js (Recommended)
module.exports = {
plugins: ['jest-hoist'],
};
Via CLI
$ babel --plugins jest-hoist script.js
Via Node API
require('@babel/core').transform('code', {
plugins: ['jest-hoist'],
});
Dependencies
Dependencies
| ID | Version |
|---|---|
| @babel/template | ^7.3.3 |
| @babel/types | ^7.3.3 |
| @types/babel__core | ^7.0.0 |
| @types/babel__traverse | ^7.0.6 |
Development Dependencies
| ID | Version |
|---|---|
| @babel/core | ^7.11.6 |
| @babel/preset-react | ^7.12.1 |
| @types/babel__template | ^7.0.2 |
| @types/node | * |
| @types/prettier | ^2.0.0 |
| babel-plugin-tester | ^10.0.0 |
| prettier | ^2.1.1 |