diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 35e770c471..5067b87eb8 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -5329,6 +5329,7 @@ fn web_platform_tests() { .arg("-A") .arg(file.path()) .arg(deno_core::serde_json::to_string(&expect_fail).unwrap()) + .arg("--quiet") .stdin(std::process::Stdio::piped()) .spawn() .unwrap(); diff --git a/cli/tests/wpt_testharnessconsolereporter.js b/cli/tests/wpt_testharnessconsolereporter.js index 5c217f29e1..2e0e06c020 100644 --- a/cli/tests/wpt_testharnessconsolereporter.js +++ b/cli/tests/wpt_testharnessconsolereporter.js @@ -39,6 +39,13 @@ function shouldExpectFail(name) { window.add_result_callback(({ message, name, stack, status }) => { const expectFail = shouldExpectFail(name); + testResults.push({ + name, + passed: status === 0, + expectFail, + message, + stack, + }); let simpleMessage = `test ${name} ... `; switch (status) { case 0: @@ -46,6 +53,10 @@ window.add_result_callback(({ message, name, stack, status }) => { simpleMessage += red("ok (expected fail)"); } else { simpleMessage += green("ok"); + if (Deno.args[1] == "--quiet") { + // don't print `ok` tests if --quiet is enabled + return; + } } break; case 1: @@ -72,14 +83,6 @@ window.add_result_callback(({ message, name, stack, status }) => { } console.log(simpleMessage); - - testResults.push({ - name, - passed: status === 0, - expectFail, - message, - stack, - }); }); window.add_completion_callback((tests, harnessStatus) => {