fix some tests to run on node 0.10
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["transform-es2015-computed-properties"]
|
||||
"plugins": ["transform-es2015-computed-properties", "transform-es5-property-mutators"]
|
||||
}
|
||||
|
||||
3
packages/babel-core/test/fixtures/esnext/es6-object-concise/options.json
vendored
Normal file
3
packages/babel-core/test/fixtures/esnext/es6-object-concise/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["transform-es2015-shorthand-properties", "transform-es2015-function-name"]
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["transform-es2015-spread", "transform-es2015-parameters"]
|
||||
"plugins": ["transform-es2015-spread", "transform-es2015-parameters", "transform-es2015-computed-properties"]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["transform-es2015-block-scoping", "transform-es2015-parameters", "transform-es2015-destructuring", "transform-es2015-modules-commonjs"]
|
||||
"plugins": ["transform-es2015-constants", "transform-es2015-block-scoping", "transform-es2015-parameters", "transform-es2015-destructuring", "transform-es2015-modules-commonjs"]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["external-helpers-2", "transform-es2015-destructuring", "transform-es2015-spread", "transform-es2015-parameters", "transform-es2015-block-scoping", "transform-object-rest-spread"]
|
||||
"plugins": ["external-helpers-2", "transform-es2015-destructuring", "transform-es2015-spread", "transform-es2015-parameters", "transform-es2015-block-scoping", "transform-object-rest-spread", "transform-regenerator"]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["external-helpers-2", "transform-es2015-object-super"]
|
||||
"plugins": ["external-helpers-2", "transform-es2015-object-super", "transform-es2015-shorthand-properties"]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
var _obj;
|
||||
|
||||
var o = _obj = {
|
||||
m() {
|
||||
m: function () {
|
||||
return babelHelpers.get(Object.getPrototypeOf(_obj), "x", this);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["external-helpers-2", "syntax-flow", "transform-es2015-parameters", "transform-es2015-block-scoping", "transform-es2015-spread", "transform-es2015-classes", "transform-es2015-destructuring", "transform-es2015-arrow-functions", "syntax-async-functions"]
|
||||
"plugins": ["external-helpers-2", "syntax-flow", "transform-es2015-parameters", "transform-es2015-block-scoping", "transform-es2015-spread", "transform-es2015-classes", "transform-es2015-destructuring", "transform-es2015-arrow-functions", "syntax-async-functions", "transform-es2015-for-of"]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
var foo = { [Symbol.hasInstance]: function () { return true; } };
|
||||
var foo = {};
|
||||
foo[Symbol.hasInstance]= function () { return true; };
|
||||
|
||||
var bar = {};
|
||||
|
||||
assert.ok(bar instanceof foo);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var counters = 0;
|
||||
Object.defineProperty(global, "reader", {
|
||||
get() {
|
||||
get: function () {
|
||||
counters += 1;
|
||||
return { x: 2 };
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
export default function () {
|
||||
return {
|
||||
visitor: {
|
||||
NumberLiteral(node) {
|
||||
NumberLiteral({ node }) {
|
||||
// number octal like 0b10 or 0o70
|
||||
if (node.extra && /^0[ob]/i.test(node.extra.raw)) {
|
||||
node.extra = undefined;
|
||||
}
|
||||
},
|
||||
|
||||
StringLiteral(node) {
|
||||
StringLiteral({ node }) {
|
||||
// unicode escape
|
||||
if (node.extra && /\\[u]/gi.test(node.extra.raw)) {
|
||||
node.extra = undefined;
|
||||
|
||||
Reference in New Issue
Block a user