fix some tests to run on node 0.10

This commit is contained in:
Sebastian McKenzie
2015-11-01 05:01:34 +00:00
parent bbb1db7e6d
commit f7073383e3
11 changed files with 16 additions and 11 deletions

View File

@@ -1,3 +1,3 @@
{
"plugins": ["transform-es2015-computed-properties"]
"plugins": ["transform-es2015-computed-properties", "transform-es5-property-mutators"]
}

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-es2015-shorthand-properties", "transform-es2015-function-name"]
}

View File

@@ -1,3 +1,3 @@
{
"plugins": ["transform-es2015-spread", "transform-es2015-parameters"]
"plugins": ["transform-es2015-spread", "transform-es2015-parameters", "transform-es2015-computed-properties"]
}

View File

@@ -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"]
}

View File

@@ -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"]
}

View File

@@ -1,3 +1,3 @@
{
"plugins": ["external-helpers-2", "transform-es2015-object-super"]
"plugins": ["external-helpers-2", "transform-es2015-object-super", "transform-es2015-shorthand-properties"]
}

View File

@@ -1,7 +1,7 @@
var _obj;
var o = _obj = {
m() {
m: function () {
return babelHelpers.get(Object.getPrototypeOf(_obj), "x", this);
}
};

View File

@@ -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"]
}

View File

@@ -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);

View File

@@ -1,6 +1,6 @@
var counters = 0;
Object.defineProperty(global, "reader", {
get() {
get: function () {
counters += 1;
return { x: 2 };
},

View File

@@ -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;