From d0de700e000c515891ae7cc7f49d41880419b836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 9 Mar 2022 14:48:20 +0100 Subject: [PATCH] test: update expected test output for 'deno test' (#13882) --- cli/tests/testdata/test/no_prompt_by_default.out | 16 +++++++++++++--- cli/tests/testdata/test/no_prompt_by_default.ts | 4 ++-- .../test/no_prompt_with_denied_perms.out | 16 +++++++++++++--- .../testdata/test/no_prompt_with_denied_perms.ts | 4 ++-- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/cli/tests/testdata/test/no_prompt_by_default.out b/cli/tests/testdata/test/no_prompt_by_default.out index 02f1625fa4..e97badb18a 100644 --- a/cli/tests/testdata/test/no_prompt_by_default.out +++ b/cli/tests/testdata/test/no_prompt_by_default.out @@ -1,7 +1,17 @@ Check [WILDCARD]/no_prompt_by_default.ts running 1 test from [WILDCARD]/no_prompt_by_default.ts -test no prompt ... -test result: FAILED. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) +test no prompt ... FAILED ([WILDCARD]ms) -error: Uncaught (in promise) PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag +failures: + +no prompt +PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag [WILDCARD] + +failures: + + no prompt + +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms) + +error: Test failed diff --git a/cli/tests/testdata/test/no_prompt_by_default.ts b/cli/tests/testdata/test/no_prompt_by_default.ts index 816454a2e3..83837825d1 100644 --- a/cli/tests/testdata/test/no_prompt_by_default.ts +++ b/cli/tests/testdata/test/no_prompt_by_default.ts @@ -1,3 +1,3 @@ -Deno.test("no prompt", () => { - Deno.readTextFile("./some_file.txt"); +Deno.test("no prompt", async () => { + await Deno.readTextFile("./some_file.txt"); }); diff --git a/cli/tests/testdata/test/no_prompt_with_denied_perms.out b/cli/tests/testdata/test/no_prompt_with_denied_perms.out index 07a7eb6a29..e8ff079c58 100644 --- a/cli/tests/testdata/test/no_prompt_with_denied_perms.out +++ b/cli/tests/testdata/test/no_prompt_with_denied_perms.out @@ -1,7 +1,17 @@ Check [WILDCARD]/no_prompt_with_denied_perms.ts running 1 test from [WILDCARD]/no_prompt_with_denied_perms.ts -test no prompt ... -test result: FAILED. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) +test no prompt ... FAILED ([WILDCARD]ms) -error: Uncaught (in promise) PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag +failures: + +no prompt +PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag [WILDCARD] + +failures: + + no prompt + +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms) + +error: Test failed diff --git a/cli/tests/testdata/test/no_prompt_with_denied_perms.ts b/cli/tests/testdata/test/no_prompt_with_denied_perms.ts index ee3736cffd..7fe5577cbf 100644 --- a/cli/tests/testdata/test/no_prompt_with_denied_perms.ts +++ b/cli/tests/testdata/test/no_prompt_with_denied_perms.ts @@ -1,3 +1,3 @@ -Deno.test("no prompt", { permissions: { read: false } }, () => { - Deno.readTextFile("./some_file.txt"); +Deno.test("no prompt", { permissions: { read: false } }, async () => { + await Deno.readTextFile("./some_file.txt"); });