web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
640 B

  1. # babel-plugin-jest-hoist
  2. 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).
  3. ## Installation
  4. ```sh
  5. $ yarn add --dev babel-plugin-jest-hoist
  6. ```
  7. ## Usage
  8. ### Via `babel.config.js` (Recommended)
  9. ```js
  10. module.exports = {
  11. plugins: ['jest-hoist'],
  12. };
  13. ```
  14. ### Via CLI
  15. ```sh
  16. $ babel --plugins jest-hoist script.js
  17. ```
  18. ### Via Node API
  19. ```javascript
  20. require('@babel/core').transform('code', {
  21. plugins: ['jest-hoist'],
  22. });
  23. ```