simplify register test (#6391)
This commit is contained in:
parent
9d00dac416
commit
58da50aace
@ -1,6 +1 @@
|
|||||||
import a from "assert";
|
import "assert";
|
||||||
|
|
||||||
export default () => {
|
|
||||||
a.foo();
|
|
||||||
return "b";
|
|
||||||
};
|
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user