1
0
Fork 0
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:
Luca Casonato 2021-01-13 02:14:17 +01:00 committed by GitHub
parent ef0bbbbeaf
commit 1728b3ba19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 8 deletions

View file

@ -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();

View file

@ -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) => {