diff options
author | 2023-06-09 19:26:36 -0700 | |
---|---|---|
committer | 2023-06-09 19:26:36 -0700 | |
commit | 76cf465cc2e87c400b6bea56cad1f17f94b91da2 (patch) | |
tree | d72518cf461407fb3c0b88d8e108057f57c8b5b6 /src/bun.js/test/jest.classes.ts | |
parent | 0f018ea2159f7bad499d8a2f50837a4d888b2344 (diff) | |
download | bun-76cf465cc2e87c400b6bea56cad1f17f94b91da2.tar.gz bun-76cf465cc2e87c400b6bea56cad1f17f94b91da2.tar.zst bun-76cf465cc2e87c400b6bea56cad1f17f94b91da2.zip |
`toMatchObject` and some asymmetric matchers (#3260)
* `toMatchObject` progress
* add `expect.stringContaining()`
* add `expect.stringMatching()`
* print asymmetric matchers
* cleanup
* return before printing if constructor value isn't there
* move matcher logic to cpp
* pretty format and tests
* fix formatting for snapshots
* format `stringContaining` and `stringMatching` like jest
* better test
* remove commented tests
* remove old property matcher code
* add types
* make sure all props are matched in arrays
* add `Bun.deepMatch`
Diffstat (limited to 'src/bun.js/test/jest.classes.ts')
-rw-r--r-- | src/bun.js/test/jest.classes.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/bun.js/test/jest.classes.ts b/src/bun.js/test/jest.classes.ts index de9f260d2..38eefe778 100644 --- a/src/bun.js/test/jest.classes.ts +++ b/src/bun.js/test/jest.classes.ts @@ -2,6 +2,17 @@ import { define } from "../scripts/class-definitions"; export default [ define({ + name: "ExpectAnything", + construct: false, + noConstructor: true, + call: true, + finalize: true, + JSType: "0b11101110", + configurable: false, + klass: {}, + proto: {}, + }), + define({ name: "ExpectAny", construct: false, noConstructor: true, @@ -14,6 +25,30 @@ export default [ proto: {}, }), define({ + name: "ExpectStringContaining", + construct: false, + noConstructor: true, + call: true, + finalize: true, + JSType: "0b11101110", + values: ["stringValue"], + configurable: false, + klass: {}, + proto: {}, + }), + define({ + name: "ExpectStringMatching", + construct: false, + noConstructor: true, + call: true, + finalize: true, + JSType: "0b11101110", + values: ["testValue"], + configurable: false, + klass: {}, + proto: {}, + }), + define({ name: "Expect", construct: true, call: true, |