Use babel-register script when running babel smoke tests (#442)

This commit is contained in:
Brian Ng 2017-03-30 10:25:23 -05:00 committed by Henry Zhu
parent 2f3123ca03
commit 4d18221098
4 changed files with 532 additions and 282 deletions

View File

@ -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

View File

@ -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",

View 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,
});

790
yarn.lock

File diff suppressed because it is too large Load Diff