succulent
Version:
Powerful and easy runtime type checking
10 lines • 361 B
JavaScript
/// <reference types="jest" />
import { is, union, $string } from "../index";
test("$string", () => {
expect(is("hi", $string)).toBe(true);
expect(is("hi", "hi")).toBe(true);
expect(is("hey", "hi")).toBe(false);
expect(is("hey", union("hi", "hey"))).toBe(true);
expect(is(0, $string)).toBe(false);
});
//# sourceMappingURL=string.test.js.map