deno.land / std@0.177.1 / datetime / to_imf_test.ts

to_imf_test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.import { assertEquals } from "../testing/asserts.ts";import { toIMF } from "./to_imf.ts";
Deno.test({ name: "[std/datetime] to IMF", fn() { const actual = toIMF(new Date(Date.UTC(1994, 3, 5, 15, 32))); const expected = "Tue, 05 Apr 1994 15:32:00 GMT"; assertEquals(actual, expected); },});
Deno.test({ name: "[std/datetime] to IMF 0", fn() { const actual = toIMF(new Date(0)); const expected = "Thu, 01 Jan 1970 00:00:00 GMT"; assertEquals(actual, expected); },});
std

Version Info

Tagged at
10 months ago