diff options
author | 2022-11-18 23:03:39 -0800 | |
---|---|---|
committer | 2022-11-18 23:03:39 -0800 | |
commit | 43b4e1b67bad69ac4da193ea2ac603b1a985839e (patch) | |
tree | d1a630d285163f55853d56afac82a586e1a999fe /src/bun.js/test/jest.classes.ts | |
parent | f3fb71205110448a4fb69ee39d11dc092a97069c (diff) | |
download | bun-43b4e1b67bad69ac4da193ea2ac603b1a985839e.tar.gz bun-43b4e1b67bad69ac4da193ea2ac603b1a985839e.tar.zst bun-43b4e1b67bad69ac4da193ea2ac603b1a985839e.zip |
bun test matchers and tests (#1526)
* ignore webkit for cherry-pick
* toContain and toBeTruthy
* toBe null, undefined, falsy, toHaveProperty, .not
* markBindings
* remove toHaveProperty, undo ignore webkit, more tests
* undo ignore webkit
* remove bad tests
* check if length property exists for toHaveLength()
* fix call signature
* handle argument that is not an integer
* getLengthOfArray returns u64
* switch to truncate
* toHaveLength() edge cases
* add toBooleanSlow()
* infinity, nan, negative
Diffstat (limited to 'src/bun.js/test/jest.classes.ts')
-rw-r--r-- | src/bun.js/test/jest.classes.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/bun.js/test/jest.classes.ts b/src/bun.js/test/jest.classes.ts index d1d225f64..ad2a5d6e8 100644 --- a/src/bun.js/test/jest.classes.ts +++ b/src/bun.js/test/jest.classes.ts @@ -128,6 +128,30 @@ export default [ fn: "toBeInstanceOf", length: 1, }, + toBeTruthy: { + fn: "toBeTruthy", + length: 0, + }, + toBeUndefined: { + fn: "toBeUndefined", + length: 0, + }, + toBeNaN: { + fn: "toBeNaN", + length: 0, + }, + toBeNull: { + fn: "toBeNull", + length: 0, + }, + toBeFalsy: { + fn: "toBeFalsy", + length: 0, + }, + toBeDefined: { + fn: "toBeDefined", + length: 0, + }, toContain: { fn: "toContain", length: 1, |