UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

14 lines (13 loc) 467 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const isError_1 = require("./isError"); describe(`isError`, () => { it(`should return true if value is an Error`, () => { const value = new Error(); expect((0, isError_1.isError)(value)).toBe(true); }); it(`should return false if value is not an Error`, () => { const value = Error; expect((0, isError_1.isError)(value)).toBe(false); }); });