travel/admin/node_modules/babel-preset-jest
yaosen 242417d45d init... 2024-06-24 11:28:18 +08:00
..
README.md init... 2024-06-24 11:28:18 +08:00
index.js init... 2024-06-24 11:28:18 +08:00
package.json init... 2024-06-24 11:28:18 +08:00

README.md

babel-preset-jest

Babel preset for all Jest plugins. This preset is automatically included when using babel-jest.

Install

$ npm install --save-dev babel-preset-jest

Usage

.babelrc

{
  "presets": ["jest"]
}

Via CLI

$ babel script.js --presets jest

Via Node API

require('babel-core').transform('code', {
  presets: ['jest'],
});