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
520 B

  1. # babel-preset-jest
  2. > Babel preset for all Jest plugins. This preset is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest).
  3. ## Install
  4. ```sh
  5. $ npm install --save-dev babel-preset-jest
  6. ```
  7. ## Usage
  8. ### Via `babel.config.js` (Recommended)
  9. ```js
  10. module.exports = {
  11. presets: ['jest'],
  12. };
  13. ```
  14. ### Via CLI
  15. ```sh
  16. $ babel script.js --presets jest
  17. ```
  18. ### Via Node API
  19. ```javascript
  20. require('@babel/core').transform('code', {
  21. presets: ['jest'],
  22. });
  23. ```