mirror of
https://github.com/denoland/deno.git
synced 2025-01-10 16:11:13 -05:00
tests: disable logging of 'ok' web platform tests (#9087)
This commit is contained in:
parent
ef0bbbbeaf
commit
1728b3ba19
2 changed files with 12 additions and 8 deletions
|
@ -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();
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue