From 3aef7d1253045c9f1e7f2b607ed3b30d2c8d1ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 25 May 2022 21:53:53 +0200 Subject: [PATCH] chore: upgrade test_util/std/ submodule (#14722) --- cli/bench/main.rs | 9 ++++++++- cli/tests/unit/console_test.ts | 2 +- cli/tests/unit/rename_test.ts | 4 ++-- cli/tests/unit/spawn_test.ts | 8 ++++---- test_util/std | 2 +- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/cli/bench/main.rs b/cli/bench/main.rs index e69727013c..1d1ff5fbde 100644 --- a/cli/bench/main.rs +++ b/cli/bench/main.rs @@ -120,6 +120,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ &[ "cache", "--reload", + "--unstable", "test_util/std/examples/chat/server_test.ts", ], None, @@ -130,13 +131,18 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ "cache", "--reload", "--no-check", + "--unstable", "test_util/std/examples/chat/server_test.ts", ], None, ), ( "bundle", - &["bundle", "test_util/std/examples/chat/server_test.ts"], + &[ + "bundle", + "--unstable", + "test_util/std/examples/chat/server_test.ts", + ], None, ), ( @@ -144,6 +150,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ &[ "bundle", "--no-check", + "--unstable", "test_util/std/examples/chat/server_test.ts", ], None, diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index 4601281ffb..d349266e8b 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -52,7 +52,7 @@ function parseCss(cssString: string): Css { return parseCss_(cssString); } -function parseCssColor(colorString: string): Css { +function parseCssColor(colorString: string): [number, number, number] | null { return parseCssColor_(colorString); } diff --git a/cli/tests/unit/rename_test.ts b/cli/tests/unit/rename_test.ts index 6d200e9c51..cf458f44de 100644 --- a/cli/tests/unit/rename_test.ts +++ b/cli/tests/unit/rename_test.ts @@ -167,7 +167,7 @@ Deno.test( () => { Deno.renameSync(olddir, file); }, - undefined, + Error, `rename '${olddir}' -> '${file}'`, ); @@ -252,7 +252,7 @@ Deno.test( () => { Deno.renameSync(olddir, emptydir); }, - undefined, + Error, `rename '${olddir}' -> '${emptydir}'`, ); diff --git a/cli/tests/unit/spawn_test.ts b/cli/tests/unit/spawn_test.ts index de47b8757b..10bcc597fb 100644 --- a/cli/tests/unit/spawn_test.ts +++ b/cli/tests/unit/spawn_test.ts @@ -381,8 +381,8 @@ Deno.test( }, ); -Deno.test({ permissions: { run: true } }, async function spawnNotFound() { - await assertRejects( +Deno.test({ permissions: { run: true } }, function spawnNotFound() { + assertThrows( () => Deno.spawn("this file hopefully doesn't exist"), Deno.errors.NotFound, ); @@ -695,8 +695,8 @@ Deno.test( }, ); -Deno.test(async function spawnStdinPipedFails() { - await assertRejects( +Deno.test(function spawnStdinPipedFails() { + assertThrows( () => Deno.spawn("id", { stdin: "piped", diff --git a/test_util/std b/test_util/std index 6069bfe413..852968f631 160000 --- a/test_util/std +++ b/test_util/std @@ -1 +1 @@ -Subproject commit 6069bfe4137864214daf43637069fa533f04ba82 +Subproject commit 852968f631b09f6df4a3b0ac6169ba3436d75fc5