deno.land / std@0.224.0 / expect / _any_test.ts

_any_test.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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));});
std

Version Info

Tagged at
6 months ago