deno.land / std@0.224.0 / expect / _any_test.ts
12345678910111213141516// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { expect } from "./expect.ts";
class Cat {}Deno.test("expect.any()", () => { expect(new Cat()).toEqual(expect.any(Cat)); expect(new Cat()).toEqual(expect.any(Object)); expect("Hello").toEqual(expect.any(String)); expect(1).toEqual(expect.any(Number)); expect(() => {}).toEqual(expect.any(Function)); expect(false).toEqual(expect.any(Boolean)); expect(BigInt(1)).toEqual(expect.any(BigInt)); expect(Symbol("sym")).toEqual(expect.any(Symbol));});
Version Info