mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
FIX: Only raise proper "error"
messages
Also support "1" for `QUNIT_FAIL_FAST` to make it consistent with other arguments.
This commit is contained in:
parent
f1b6b1bd0e
commit
09254410ea
|
@ -121,7 +121,7 @@ export function ajax() {
|
|||
// 0 represents the `UNSENT` state
|
||||
if (xhr.readyState === 0) {
|
||||
// Make sure we log pretender errors in test mode
|
||||
if (isTesting()) {
|
||||
if (textStatus === "error" && isTesting()) {
|
||||
throw errorThrown;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -109,10 +109,11 @@ async function runAllTests() {
|
|||
Page.navigate({ url: args[0] });
|
||||
|
||||
Page.loadEventFired(async () => {
|
||||
let qff = process.env.QUNIT_FAIL_FAST;
|
||||
await Runtime.evaluate({
|
||||
expression:
|
||||
`const QUNIT_FAIL_FAST = ` +
|
||||
(process.env.QUNIT_FAIL_FAST === "true").toString() +
|
||||
(qff === "1" || qff === "true").toString() +
|
||||
";"
|
||||
});
|
||||
await Runtime.evaluate({
|
||||
|
@ -262,7 +263,7 @@ function logQUnit() {
|
|||
if (context.failed) {
|
||||
console.log("\nUse this filter to run in the same order:");
|
||||
console.log(
|
||||
"QUNIT_FAIL_FAST=true QUNIT_SEED=" +
|
||||
"QUNIT_FAIL_FAST=1 QUNIT_SEED=" +
|
||||
QUnit.config.seed +
|
||||
" rake qunit:test\n"
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user