Merge branch 'master' of github.com:babel/babel
This commit is contained in:
commit
d5e7b5616c
@ -1,4 +1,5 @@
|
|||||||
import "./bar2";
|
import "./bar2";
|
||||||
|
import "./not_node_modules";
|
||||||
|
|
||||||
var foo = () => console.log("foo");
|
var foo = () => console.log("foo");
|
||||||
foo();
|
foo();
|
||||||
|
|||||||
@ -0,0 +1,10 @@
|
|||||||
|
/*
|
||||||
|
The purpose of this file is to test that the node_modules check in the require
|
||||||
|
hook doesn't mistakenly exclude something like "not_node_modules". To pass, this
|
||||||
|
file merely needs to be transpiled. The transpiled code won't, and doesn't need
|
||||||
|
to, execute without error. It won't execute because React will be undefined.
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
<Some jsx="element" />;
|
||||||
|
}
|
||||||
|
catch (e) {}
|
||||||
@ -1 +0,0 @@
|
|||||||
() => {};
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
var chai = require("chai");
|
|
||||||
|
|
||||||
// Require-hook.
|
|
||||||
require("../../lib/babel/api/register/node");
|
|
||||||
|
|
||||||
suite("require hook", function () {
|
|
||||||
test("not node_modules", function () {
|
|
||||||
chai.expect(function () {
|
|
||||||
require("./fixtures/require-hook/not_node_modules/input");
|
|
||||||
}).to.not.throw();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Loading…
x
Reference in New Issue
Block a user