diff options
| author | 2023-03-16 11:04:55 +0800 | |
|---|---|---|
| committer | 2023-03-15 20:04:55 -0700 | |
| commit | 0befd9ad8573e8be003fa2dbca2753c6216538ab (patch) | |
| tree | 168011aea064edd7a9ba2ad459ebbbd56d0286b4 /test | |
| parent | 79a05d50ad58059f6cea973deb59e8fab4e50e31 (diff) | |
| download | bun-0befd9ad8573e8be003fa2dbca2753c6216538ab.tar.gz bun-0befd9ad8573e8be003fa2dbca2753c6216538ab.tar.zst bun-0befd9ad8573e8be003fa2dbca2753c6216538ab.zip | |
feat(expect): update toBeInstanceOf (#2396)
* feat: update instanceof binding
* fix: according to PR comments
Diffstat (limited to 'test')
| -rw-r--r-- | test/js/bun/test/expect.test.ts | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/test/js/bun/test/expect.test.ts b/test/js/bun/test/expect.test.ts index 8a7a6dde3..9a70aca0a 100644 --- a/test/js/bun/test/expect.test.ts +++ b/test/js/bun/test/expect.test.ts @@ -7,18 +7,13 @@ describe("expect()", () => { const tests = [ { label: "string", - value: "", + value: new String(""), instanceOf: String, }, { label: "number", - value: 1, - instanceof: Number, - }, - { - label: "bigint", - value: 1n, - instanceof: BigInt, + value: new Number(1), + instanceOf: Number, }, { label: "object", @@ -28,22 +23,22 @@ describe("expect()", () => { { label: "function", value: () => {}, - instanceof: Function, + instanceOf: Function, }, { label: "Class", value: new Animal(), - instanceof: Animal, + instanceOf: Animal, }, { label: "extends Class", value: new Dog(), - instanceof: Dog, + instanceOf: Dog, }, { label: "super Class", value: new Dog(), - instanceof: Animal, + instanceOf: Animal, }, ]; for (const { label, value, instanceOf } of tests) { |
