aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Tiramify (A.K. Daniel) <94789999+TiranexDev@users.noreply.github.com> 2023-06-17 23:05:28 +0200
committerGravatar GitHub <noreply@github.com> 2023-06-17 14:05:28 -0700
commit065713aeca2ae3013bdf5b3d2f04263459631598 (patch)
treec04b82d4bbffe642e997dd7c2b105b147fa20379
parent68c092aef25f11b25ed61bb0edcc1ebb1a2a7413 (diff)
downloadbun-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.ts18
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)