Quit tests early, output seed to easily reproduce failure

This commit is contained in:
Robin Ward 2020-08-05 12:20:28 -04:00
parent 67e8bc5342
commit 18e3339580

View File

@ -194,6 +194,7 @@ function logQUnit() {
testErrors.push(msg); testErrors.push(msg);
assertionErrors = []; assertionErrors = [];
console.log("F"); console.log("F");
QUnit.config.queue.length = 0;
} else { } else {
console.log("."); console.log(".");
} }
@ -245,6 +246,17 @@ function logQUnit() {
]; ];
console.log(stats.join(", ")); console.log(stats.join(", "));
if (context.failed) {
console.log("\nUse this filter to run in the same order:");
console.log("QUNIT_SEED=" + QUnit.config.seed + " rake qunit:test\n");
console.log("If you have a web environment running, you can visit:");
console.log(
"http://localhost:3000/qunit?hidepassed&seed=" +
QUnit.config.seed +
"\n\n"
);
}
window.qunitDone = context; window.qunitDone = context;
}); });
} }