std/assert/shared_test.ts
Lino Le Van c46143f0ac
chore: update copyright year (#4046)
* chore: update copyright year

* fix

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-02 08:11:32 +11:00

21 lines
566 B
TypeScript

// 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 });
},
});