mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
26 lines
483 B
TypeScript
26 lines
483 B
TypeScript
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
import * as assert from "node:assert";
|
|
|
|
Deno.test("[node/assert] .throws() compares Error instance", () => {
|
|
assert.throws(
|
|
() => {
|
|
throw new Error("FAIL");
|
|
},
|
|
Error,
|
|
);
|
|
|
|
assert.throws(
|
|
() => {
|
|
throw new TypeError("FAIL");
|
|
},
|
|
TypeError,
|
|
);
|
|
});
|
|
|
|
Deno.test("[node/assert] deepStrictEqual(0, -0)", () => {
|
|
assert.throws(
|
|
() => {
|
|
assert.deepStrictEqual(0, -0);
|
|
},
|
|
);
|
|
});
|