6to5-jest 中文文档教程
6to5-jest
Usage
做如下对 package.json
的更改:
{
"dependencies": {
"6to5-jest": "*",
"jest": "*"
},
"scripts": {
"test": "jest"
},
"jest": {
"scriptPreprocessor": "<rootDir>/node_modules/6to5-jest",
"testFileExtensions": ["es6", "js"],
"moduleFileExtensions": ["js", "json", "es6"]
}
}
然后运行:
$ npm install
一切顺利!
6to5-jest
Usage
Make the following changes to package.json
:
{
"dependencies": {
"6to5-jest": "*",
"jest": "*"
},
"scripts": {
"test": "jest"
},
"jest": {
"scriptPreprocessor": "<rootDir>/node_modules/6to5-jest",
"testFileExtensions": ["es6", "js"],
"moduleFileExtensions": ["js", "json", "es6"]
}
}
And run:
$ npm install
And you're good to go!