2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2023-07-13 07:04:30 +00:00
|
|
|
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 });
|
|
|
|
},
|
|
|
|
});
|