diff options
author | Ian Bull <irbull@gmail.com> | 2024-09-04 00:19:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 09:19:55 +0200 |
commit | 939c23f9fe332797f4b2c8a80359fd36a3e7c105 (patch) | |
tree | c20c31bf6b95290e1b4bcaa83d087bd13a0eb902 /tests/unit/testing_test.ts | |
parent | 072bf5d379b691c4decd3c167a51801bad8ca2f6 (diff) |
refactor(cli/js): align error messages (#25406)
Aligns the error messages in the cli/js folder to be in-line with the
Deno style guide.
Diffstat (limited to 'tests/unit/testing_test.ts')
-rw-r--r-- | tests/unit/testing_test.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/unit/testing_test.ts b/tests/unit/testing_test.ts index e04ab921c..51372c42b 100644 --- a/tests/unit/testing_test.ts +++ b/tests/unit/testing_test.ts @@ -8,7 +8,7 @@ Deno.test(function testWrongOverloads() { Deno.test("some name", { fn: () => {} }, () => {}); }, TypeError, - "Unexpected 'fn' field in options, test function is already provided as the third argument.", + "Unexpected 'fn' field in options, test function is already provided as the third argument", ); assertThrows( () => { @@ -16,7 +16,7 @@ Deno.test(function testWrongOverloads() { Deno.test("some name", { name: "some name2" }, () => {}); }, TypeError, - "Unexpected 'name' field in options, test name is already provided as the first argument.", + "Unexpected 'name' field in options, test name is already provided as the first argument", ); assertThrows( () => { @@ -40,7 +40,7 @@ Deno.test(function testWrongOverloads() { Deno.test({ fn: () => {} }, function foo() {}); }, TypeError, - "Unexpected 'fn' field in options, test function is already provided as the second argument.", + "Unexpected 'fn' field in options, test function is already provided as the second argument", ); assertThrows( () => { @@ -48,7 +48,7 @@ Deno.test(function testWrongOverloads() { Deno.test({}); }, TypeError, - "Expected 'fn' field in the first argument to be a test function.", + "Expected 'fn' field in the first argument to be a test function", ); assertThrows( () => { @@ -56,7 +56,7 @@ Deno.test(function testWrongOverloads() { Deno.test({ fn: "boo!" }); }, TypeError, - "Expected 'fn' field in the first argument to be a test function.", + "Expected 'fn' field in the first argument to be a test function", ); }); @@ -87,7 +87,7 @@ Deno.test(async function invalidStepArguments(t) { await (t as any).step("test"); }, TypeError, - "Expected function for second argument.", + "Expected function for second argument", ); await assertRejects( @@ -96,7 +96,7 @@ Deno.test(async function invalidStepArguments(t) { await (t as any).step("test", "not a function"); }, TypeError, - "Expected function for second argument.", + "Expected function for second argument", ); await assertRejects( @@ -105,7 +105,7 @@ Deno.test(async function invalidStepArguments(t) { await (t as any).step(); }, TypeError, - "Expected a test definition or name and function.", + "Expected a test definition or name and function", ); await assertRejects( @@ -114,7 +114,7 @@ Deno.test(async function invalidStepArguments(t) { await (t as any).step(() => {}); }, TypeError, - "The step function must have a name.", + "The step function must have a name", ); }); |