update traceur test runner

This commit is contained in:
Sebastian McKenzie 2015-02-08 16:19:05 +11:00
parent 6fd7f9868e
commit 055545980c
2 changed files with 44 additions and 17 deletions

View File

@ -16,6 +16,14 @@ global.assertNoOwnProperties = function (obj) {
assert.equal(Object.getOwnPropertyNames(obj).length, 0); assert.equal(Object.getOwnPropertyNames(obj).length, 0);
}; };
global.assertHasOwnProperty = function () {
};
global.assertLacksOwnProperty = function () {
};
global.assertArrayEquals = assert.deepEqual; global.assertArrayEquals = assert.deepEqual;
global.assert = chai.assert; global.assert = chai.assert;
global.chai = chai; global.chai = chai;
@ -129,12 +137,7 @@ module.exports = function (suiteOpts, taskOpts, dynamicOpts) {
var runTest = function (done) { var runTest = function (done) {
var runTask = function () { var runTask = function () {
try { run(task, done);
run(task, done);
} catch (err) {
if (task.options.after) task.options.after();
throw err;
}
}; };
_.extend(task.options, taskOpts); _.extend(task.options, taskOpts);

View File

@ -10,6 +10,18 @@ require("./_transformation-helper")({
loc: __dirname + "/../vendor/traceur/test/feature", loc: __dirname + "/../vendor/traceur/test/feature",
ignoreSuites: [ ignoreSuites: [
"Modules",
"Classes",
// these are the responsibility of regenerator
"AsyncFunctions",
"Yield",
// these are the responsibility of core-js
"StringExtras",
"ArrayExtras",
"Collections",
// these are all internal traceur tests or non-standard features // these are all internal traceur tests or non-standard features
"ObjectMixin", "ObjectMixin",
"Annotations", "Annotations",
@ -24,9 +36,24 @@ require("./_transformation-helper")({
], ],
ignoreTasks: [ ignoreTasks: [
// core.js doesn't support due to a perf hit and having to override a lot // these are the responsibility of core-js
// of native methods
"Symbol/GetOwnPropertySymbols", "Symbol/GetOwnPropertySymbols",
"Spread/Type",
"Symbol/ObjectModel",
"Symbol/Object",
"Spread/NoIterator",
"Destructuring/Rest",
"Destructuring/Empty",
// traceur uses an old version of regexpu
"RegularExpression/Simple",
// class methods are still enumerable in traceur
"NumericLiteral/Simple",
"Classes/Method",
// Object.mixin didn't make it into ES6
"ObjectMixin",
// traceur doesn't name methods and has an incorrect test asserting that // traceur doesn't name methods and has an incorrect test asserting that
// they have no names // they have no names
@ -38,20 +65,17 @@ require("./_transformation-helper")({
"Syntax/UseStrictLineContinuation", "Syntax/UseStrictLineContinuation",
// experimental es7 - the spec hasn't been finalized yet // experimental es7 - the spec hasn't been finalized yet
// these both fail because of filter between blocks // these both fail because of filters between blocks
"ArrayComprehension/Simple", "ArrayComprehension/Simple",
"GeneratorComprehension/Simple", "GeneratorComprehension/Simple",
// yield has been added as a keyword in ES6 so this test is actually incorrect // yield has been added as a keyword in ES6
"Yield/YieldIdentifier" "Yield/YieldIdentifier",
"Syntax/StrictKeywords"
] ]
}, { }, {
optional: ["typeofSymbol"], optional: ["spec.typeofSymbol"],
experimental: true, experimental: true
after: function () {
// StringExtras/StarsWith
delete Object.prototype[1];
}
}, function (opts, task) { }, function (opts, task) {
if (!_.contains(task.exec.loc, "module.js")) { if (!_.contains(task.exec.loc, "module.js")) {
opts.blacklist = ["useStrict"]; opts.blacklist = ["useStrict"];