Fix tests

This commit is contained in:
Sebastian McKenzie
2014-12-05 23:05:20 +11:00
parent 055f894a88
commit 5bad458b09
13 changed files with 34 additions and 70 deletions

View File

@@ -1,3 +1,3 @@
arr.map(function () {
return $@!@#;
return $#!;
});

View File

@@ -1,3 +1,3 @@
{
"throws": "Unexpected character '@'"
"throws": "Unexpected character '#'"
}

View File

@@ -1,11 +1,6 @@
"use strict";
var _slice = Array.prototype.slice;
var _classProps = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
constructor: {
@@ -34,25 +29,17 @@ var Test = (function (Foo) {
_extends(Test, Foo);
_classProps(Test, {
foo: {
writable: true,
value: function () {
Foo.foo.call(this);
Foo.foo.call.apply(Foo.foo, [this].concat(_slice.call(arguments)));
Foo.foo.call.apply(Foo.foo, [this, "test"].concat(_slice.call(arguments)));
}
}
}, {
test: {
writable: true,
value: function () {
Foo.prototype.test.call(this);
Foo.prototype.test.call.apply(Foo.prototype.test, [this].concat(_slice.call(arguments)));
Foo.prototype.test.call.apply(Foo.prototype.test, [this, "test"].concat(_slice.call(arguments)));
}
}
});
Test.prototype.test = function () {
Foo.prototype.test.call(this);
Foo.prototype.test.call.apply(Foo.prototype.test, [this].concat(_slice.call(arguments)));
Foo.prototype.test.call.apply(Foo.prototype.test, [this, "test"].concat(_slice.call(arguments)));
};
Test.foo = function () {
Foo.foo.call(this);
Foo.foo.call.apply(Foo.foo, [this].concat(_slice.call(arguments)));
Foo.foo.call.apply(Foo.foo, [this, "test"].concat(_slice.call(arguments)));
};
return Test;
})(Foo);

View File

@@ -1,10 +1,5 @@
"use strict";
var _classProps = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
constructor: {
@@ -25,14 +20,9 @@ var Test = (function (Foo) {
_extends(Test, Foo);
_classProps(Test, {
test: {
writable: true,
value: function () {
return Foo.wow.call(this);
}
}
});
Test.test = function () {
return Foo.wow.call(this);
};
return Test;
})(Foo);

View File

@@ -1,21 +1,11 @@
"use strict";
var _classProps = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var Test = (function () {
var Test = function Test() {};
_classProps(Test, null, {
test: {
writable: true,
value: function () {
return 5 + 5;
}
}
});
Test.prototype.test = function () {
return 5 + 5;
};
return Test;
})();

View File

@@ -1,10 +1,5 @@
"use strict";
var _classProps = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var BaseView = function BaseView() {
this.autoRender = true;
};
@@ -16,14 +11,9 @@ var BaseView = function () {
var BaseView = (function () {
var _class2 = function () {};
_classProps(_class2, null, {
foo: {
writable: true,
value: function () {
this.autoRender = true;
}
}
});
_class2.prototype.foo = function () {
this.autoRender = true;
};
return _class2;
})();

View File

@@ -8,11 +8,9 @@ var _classProps = function (child, staticProps, instanceProps) {
var A = (function () {
var A = function A() {};
A.a = function () {};
_classProps(A, {
a: {
writable: true,
value: function () {}
},
b: {
get: function () {},
set: function (b) {}

View File

@@ -1,5 +1,5 @@
var obj = {
[foobar]() {
return "foobar";
return "foobar";
}
};

View File

@@ -4,5 +4,6 @@ var obj = (function (_obj) {
_obj[foobar] = function () {
return "foobar";
};
return _obj;
})({});

View File

@@ -6,7 +6,9 @@ define(["exports"], function (exports) {
exports["default"] = [];
exports["default"] = foo;
exports["default"] = function () {};
exports["default"] = function () {};
function foo() {}
exports["default"] = foo;
var Foo = function Foo() {};

View File

@@ -6,7 +6,9 @@ module.exports = {};
module.exports = [];
module.exports = foo;
module.exports = function () {};
module.exports = function () {};
function foo() {}
var Foo = function Foo() {};

View File

@@ -5,7 +5,9 @@ exports["default"] = {};
exports["default"] = [];
exports["default"] = foo;
exports["default"] = function () {};
exports["default"] = function () {};
function foo() {}
exports["default"] = foo;
var Foo = function Foo() {};

View File

@@ -12,7 +12,9 @@
exports["default"] = [];
exports["default"] = foo;
exports["default"] = function () {};
exports["default"] = function () {};
function foo() {}
exports["default"] = foo;
var Foo = function Foo() {};