move all plugin tests out of babel-core and into their appropriate folders

This commit is contained in:
Sebastian McKenzie
2015-11-08 23:04:10 -08:00
parent 5f40b53dee
commit 15969a0904
1189 changed files with 365 additions and 65 deletions

View File

@@ -11,5 +11,8 @@
"dependencies": {
"babel-plugin-syntax-class-properties": "^6.0.14",
"babel-runtime": "^5.0.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.0.0"
}
}
}

View File

@@ -0,0 +1,9 @@
var foo = "bar";
class Foo {
bar = foo;
constructor() {
var foo = "foo";
}
}

View File

@@ -0,0 +1,13 @@
var foo = "bar";
var Foo = function Foo() {
babelHelpers.classCallCheck(this, Foo);
_initialiseProps.call(this);
var foo = "foo";
};
var _initialiseProps = function () {
this.bar = foo;
};

View File

@@ -0,0 +1,3 @@
class Foo extends Bar {
bar = "foo";
}

View File

@@ -0,0 +1,12 @@
var Foo = (function (_Bar) {
babelHelpers.inherits(Foo, _Bar);
function Foo(...args) {
var _temp, _this;
babelHelpers.classCallCheck(this, Foo);
return babelHelpers.possibleConstructorReturn(_this, (_temp = (_this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Foo).call(this, ...args)), _this), _this.bar = "foo", _temp));
}
return Foo;
})(Bar);

View File

@@ -0,0 +1,3 @@
var Foo = function Foo() {
babelHelpers.classCallCheck(this, Foo);
};

View File

@@ -0,0 +1,3 @@
class Foo {
bar = "foo";
}

View File

@@ -0,0 +1,4 @@
var Foo = function Foo() {
babelHelpers.classCallCheck(this, Foo);
this.bar = "foo";
};

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers-2", "transform-class-properties", "transform-es2015-classes", "transform-es2015-block-scoping", "syntax-class-properties"]
}

View File

@@ -0,0 +1,3 @@
class Foo {
static bar;
}

View File

@@ -0,0 +1,6 @@
class Foo {
static num;
}
assert.equal("num" in Foo, false);
assert.equal(Foo.num, undefined);

View File

@@ -0,0 +1,3 @@
var Foo = function Foo() {
babelHelpers.classCallCheck(this, Foo);
};

View File

@@ -0,0 +1,3 @@
class Foo {
static bar = "foo";
}

View File

@@ -0,0 +1,9 @@
class Foo {
static num = 0;
static str = "foo";
}
assert.equal(Foo.num, 0);
assert.equal(Foo.num = 1, 1);
assert.equal(Foo.str, "foo");
assert.equal(Foo.str = "bar", "bar");

View File

@@ -0,0 +1,5 @@
var Foo = function Foo() {
babelHelpers.classCallCheck(this, Foo);
};
Foo.bar = "foo";

View File

@@ -0,0 +1,7 @@
class Foo extends Bar {
bar = "foo";
constructor() {
foo(super());
}
}

View File

@@ -0,0 +1,14 @@
var Foo = (function (_Bar) {
babelHelpers.inherits(Foo, _Bar);
function Foo() {
var _temp, _this;
babelHelpers.classCallCheck(this, Foo);
foo((_temp = (_this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Foo).call(this)), _this), _this.bar = "foo", _temp));
return _this;
}
return Foo;
})(Bar);

View File

@@ -0,0 +1,7 @@
class Foo extends Bar {
bar = "foo";
constructor() {
super();
}
}

View File

@@ -0,0 +1,14 @@
var Foo = (function (_Bar) {
babelHelpers.inherits(Foo, _Bar);
function Foo() {
babelHelpers.classCallCheck(this, Foo);
var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Foo).call(this));
_this.bar = "foo";
return _this;
}
return Foo;
})(Bar);

View File

@@ -0,0 +1 @@
require("babel-helper-plugin-test-runner")(__dirname);