Use babel-register script when running babel smoke tests (#442)
This commit is contained in:
parent
2f3123ca03
commit
4d18221098
2
Makefile
2
Makefile
@ -19,7 +19,7 @@ test-babel:
|
||||
cd ./build/babel; \
|
||||
jq "del(.nyc)" package.json > package.nonyc.json; \
|
||||
mv -f package.nonyc.json package.json; \
|
||||
../../node_modules/.bin/nyc --no-instrument --no-source-map --reporter=json --report-dir ../../coverage node_modules/mocha/bin/_mocha `scripts/_get-test-directories.sh` --opts test/mocha.opts; \
|
||||
../../node_modules/.bin/nyc --no-instrument --no-source-map --reporter=json --report-dir ../../coverage node_modules/mocha/bin/_mocha `scripts/_get-test-directories.sh` --opts test/mocha.opts --compilers js:../../scripts/test-babel-register.js; \
|
||||
|
||||
bootstrap-flow: clean
|
||||
mkdir ./build
|
||||
|
||||
12
package.json
12
package.json
@ -22,14 +22,14 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^0.18.0",
|
||||
"babel-cli": "^6.14.0",
|
||||
"babel-cli": "^7.0.0-alpha.6",
|
||||
"babel-eslint": "^7.0.0",
|
||||
"babel-helper-fixtures": "^6.9.0",
|
||||
"babel-plugin-external-helpers": "^6.18.0",
|
||||
"babel-helper-fixtures": "^7.0.0-alpha.3",
|
||||
"babel-plugin-external-helpers": "^7.0.0-alpha.3",
|
||||
"babel-plugin-istanbul": "^4.0.0",
|
||||
"babel-plugin-transform-flow-strip-types": "^6.14.0",
|
||||
"babel-preset-es2015": "^6.14.0",
|
||||
"babel-preset-stage-0": "^6.5.0",
|
||||
"babel-plugin-transform-flow-strip-types": "^7.0.0-alpha.3",
|
||||
"babel-preset-es2015": "^7.0.0-alpha.3",
|
||||
"babel-preset-stage-0": "^7.0.0-alpha.3",
|
||||
"chalk": "^1.1.3",
|
||||
"cross-env": "^3.1.4",
|
||||
"eslint": "^3.7.1",
|
||||
|
||||
10
scripts/test-babel-register.js
Normal file
10
scripts/test-babel-register.js
Normal file
@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
const register = require("babel-register").default;
|
||||
|
||||
register({
|
||||
extensions: [".js"],
|
||||
// Only js files in the test folder but not in the subfolder fixtures.
|
||||
only: [/packages\/.+\/test\/(?!fixtures\/).+\.js$/],
|
||||
compact: true,
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user