UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

19 lines (17 loc) 466 B
import { arrayContains } from "./array-contains.js"; import { Test_setDefaultFlags } from "../../test-util/test_set-default-flags.js"; describe("=> arrayContains", () => { beforeEach(() => { Test_setDefaultFlags(); }); it("returns true if present", () => { expect(arrayContains([1, 2, 3], 3)).toBeTrue(); }); it("returns false if present", () => { expect(arrayContains([1, 2, 3], 4)).toBeFalse(); }); });