simplify register test (#6391)

This commit is contained in:
Henry Zhu 2017-10-16 11:09:11 -04:00 committed by GitHub
parent 9d00dac416
commit 58da50aace
2 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1 @@
import a from "assert"; import "assert";
export default () => {
a.foo();
return "b";
};

View File

@ -1,5 +1,4 @@
import chai from "chai"; import chai from "chai";
import path from "path";
const DATA_ES2015 = require.resolve("./__data__/es2015"); const DATA_ES2015 = require.resolve("./__data__/es2015");
@ -12,7 +11,15 @@ describe("babel-register", function() {
babelRegister.default( babelRegister.default(
Object.assign( Object.assign(
{ {
presets: [path.join(__dirname, "../../babel-preset-es2015")], plugins: [
{
visitor: {
ImportDeclaration(path) {
path.remove();
},
},
},
],
babelrc: false, babelrc: false,
}, },
config, config,