move all plugin tests out of babel-core and into their appropriate folders
This commit is contained in:
9
packages/babel-plugin-transform-jscript/test/fixtures/jscript/arrow-function/exec.js
vendored
Normal file
9
packages/babel-plugin-transform-jscript/test/fixtures/jscript/arrow-function/exec.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
class MyClass {
|
||||
test() {
|
||||
const that = this;
|
||||
const func = () => this === that;
|
||||
return func();
|
||||
}
|
||||
}
|
||||
|
||||
assert(new MyClass().test());
|
||||
3
packages/babel-plugin-transform-jscript/test/fixtures/jscript/options.json
vendored
Normal file
3
packages/babel-plugin-transform-jscript/test/fixtures/jscript/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["external-helpers-2", "transform-es2015-block-scoping", "transform-es2015-classes", "transform-jscript", "transform-es2015-arrow-functions"]
|
||||
}
|
||||
2
packages/babel-plugin-transform-jscript/test/fixtures/jscript/simple-class/actual.js
vendored
Normal file
2
packages/babel-plugin-transform-jscript/test/fixtures/jscript/simple-class/actual.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
class Test {
|
||||
}
|
||||
7
packages/babel-plugin-transform-jscript/test/fixtures/jscript/simple-class/expected.js
vendored
Normal file
7
packages/babel-plugin-transform-jscript/test/fixtures/jscript/simple-class/expected.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
var Test = (function () {
|
||||
function Test() {
|
||||
babelHelpers.classCallCheck(this, Test);
|
||||
}
|
||||
|
||||
return Test;
|
||||
})();
|
||||
@@ -0,0 +1,7 @@
|
||||
var IdenticalName = function IdenticalName(x) {
|
||||
return x;
|
||||
};
|
||||
|
||||
(function foo() {
|
||||
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
var IdenticalName = (function () {
|
||||
function IdenticalName(x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
return IdenticalName;
|
||||
})();
|
||||
|
||||
(function () {
|
||||
function foo() {}
|
||||
|
||||
return foo;
|
||||
})();
|
||||
1
packages/babel-plugin-transform-jscript/test/index.js
Normal file
1
packages/babel-plugin-transform-jscript/test/index.js
Normal file
@@ -0,0 +1 @@
|
||||
require("babel-helper-plugin-test-runner")(__dirname);
|
||||
Reference in New Issue
Block a user