Move @babel/node tests (#13037)

This commit is contained in:
Nicolò Ribaudo
2021-03-22 23:08:18 +01:00
parent 4f727139ec
commit afef4f85ff
60 changed files with 46 additions and 52 deletions

View File

@@ -0,0 +1,2 @@
var bar = () => console.log("bar");
bar();

View File

@@ -0,0 +1,5 @@
import "./bar2";
import "./not_node_modules";
var foo = () => console.log("foo");
foo();

View File

@@ -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) {}