diff options
author | 2023-06-17 23:05:28 +0200 | |
---|---|---|
committer | 2023-06-17 14:05:28 -0700 | |
commit | 065713aeca2ae3013bdf5b3d2f04263459631598 (patch) | |
tree | c04b82d4bbffe642e997dd7c2b105b147fa20379 | |
parent | 68c092aef25f11b25ed61bb0edcc1ebb1a2a7413 (diff) | |
download | bun-065713aeca2ae3013bdf5b3d2f04263459631598.tar.gz bun-065713aeca2ae3013bdf5b3d2f04263459631598.tar.zst bun-065713aeca2ae3013bdf5b3d2f04263459631598.zip |
Add types for toBeOdd & toBeEven (#3344)
-rw-r--r-- | packages/bun-types/bun-test.d.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/bun-types/bun-test.d.ts b/packages/bun-types/bun-test.d.ts index d6bc062c0..05fd0eac0 100644 --- a/packages/bun-types/bun-test.d.ts +++ b/packages/bun-types/bun-test.d.ts @@ -441,6 +441,24 @@ declare module "bun:test" { */ toBe(expected: T): void; /** + * Asserts that a number is odd. + * + * @link https://jest-extended.jestcommunity.dev/docs/matchers/number/#tobeodd + * @example + * expect(1).toBeOdd(); + * expect(2).not.toBeOdd(); + */ + toBeOdd(): void; + /** + * Asserts that a number is even. + * + * @link https://jest-extended.jestcommunity.dev/docs/matchers/number/#tobeeven + * @example + * expect(2).toBeEven(); + * expect(1).not.toBeEven(); + */ + toBeEven(): void; + /** * Asserts that value is close to the expected by floating point precision. * * For example, the following fails because arithmetic on decimal (base 10) |