diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-28 12:33:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-28 12:33:09 +0200 |
commit | 8feb30e3258ed9690eb850e3ca22842b260a0403 (patch) | |
tree | 6805bfe3df675c2c7f6a379093061c6b73d8365a /std/datetime/test.ts | |
parent | b508e845671de9351c3f51755647371d76128d29 (diff) |
BREAKING: remove overload of Deno.test() (#4951)
This commit removes overload of Deno.test() that accepted named
function.
Diffstat (limited to 'std/datetime/test.ts')
-rw-r--r-- | std/datetime/test.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/std/datetime/test.ts b/std/datetime/test.ts index dc93095f4..c50914342 100644 --- a/std/datetime/test.ts +++ b/std/datetime/test.ts @@ -2,7 +2,7 @@ import { assertEquals, assertThrows } from "../testing/asserts.ts"; import * as datetime from "./mod.ts"; -Deno.test(function parseDateTime(): void { +Deno.test("parseDateTime", function (): void { assertEquals( datetime.parseDateTime("01-03-2019 16:30", "mm-dd-yyyy hh:mm"), new Date(2019, 0, 3, 16, 30) @@ -29,7 +29,7 @@ Deno.test(function parseDateTime(): void { ); }); -Deno.test(function invalidParseDateTimeFormatThrows(): void { +Deno.test("invalidParseDateTimeFormatThrows", function (): void { assertThrows( (): void => { // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -40,7 +40,7 @@ Deno.test(function invalidParseDateTimeFormatThrows(): void { ); }); -Deno.test(function parseDate(): void { +Deno.test("parseDate", function (): void { assertEquals( datetime.parseDate("01-03-2019", "mm-dd-yyyy"), new Date(2019, 0, 3) @@ -55,7 +55,7 @@ Deno.test(function parseDate(): void { ); }); -Deno.test(function invalidParseDateFormatThrows(): void { +Deno.test("invalidParseDateFormatThrows", function (): void { assertThrows( (): void => { // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -66,13 +66,13 @@ Deno.test(function invalidParseDateFormatThrows(): void { ); }); -Deno.test(function DayOfYear(): void { +Deno.test("DayOfYear", function (): void { assertEquals(1, datetime.dayOfYear(new Date("2019-01-01T03:24:00"))); assertEquals(70, datetime.dayOfYear(new Date("2019-03-11T03:24:00"))); assertEquals(365, datetime.dayOfYear(new Date("2019-12-31T03:24:00"))); }); -Deno.test(function currentDayOfYear(): void { +Deno.test("currentDayOfYear", function (): void { assertEquals(datetime.currentDayOfYear(), datetime.dayOfYear(new Date())); }); |