mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
21 lines
566 B
TypeScript
21 lines
566 B
TypeScript
// Copyright 2018-2023 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 });
|
|
},
|
|
});
|