std/assert/unimplemented_test.ts
Michael Herzner b649680328
test(assert): improve test coverage (#4679)
* test(assert): improve test coverage

* chore: format

* chore: lint

* nits

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-05-07 00:08:16 +00:00

15 lines
471 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { AssertionError, assertThrows, unimplemented } from "./mod.ts";
Deno.test("unimplemented() throws", function () {
assertThrows(() => unimplemented(), AssertionError, "Unimplemented.");
});
Deno.test("unimplemented() throws with custom message", function () {
assertThrows(
() => unimplemented("CUSTOM MESSAGE"),
AssertionError,
"Unimplemented: CUSTOM MESSAGE",
);
});