deno.land / std@0.224.0 / assert / shared_test.ts

shared_test.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.import { assertArrayIncludes, assertEquals, assertNotEquals, assertNotStrictEquals, assertStrictEquals,} from "./mod.ts";
Deno.test({ name: "assert* functions with specified type parameter", fn() { assertEquals<string>("hello", "hello"); assertNotEquals<number>(1, 2); assertArrayIncludes<boolean>([true, false], [true]); const value = { x: 1 }; assertStrictEquals<typeof value>(value, value); assertNotStrictEquals<object>(value, { x: 1 }); },});
std

Version Info

Tagged at
6 months ago