mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-27 02:41:07 -05:00
12 lines
357 B
TypeScript
12 lines
357 B
TypeScript
|
import { isError } from "@/utils/errors/error";
|
||
|
|
||
|
describe("isError", () => {
|
||
|
test("returns true if the input is an instance of Error", () => {
|
||
|
expect(isError(new Error("test error"))).toBe(true);
|
||
|
});
|
||
|
|
||
|
test("returns false if the input is not an instance of Error", () => {
|
||
|
expect(isError("not an error")).toBe(false);
|
||
|
});
|
||
|
});
|