Skip to content

Commit f83f4e9

Browse files
Add some new test cases for subtraction operation
1 parent 92e13e0 commit f83f4e9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

operations/arithmethics/operations.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ describe("Testing Subbtaction implementation", () => {
5151
expect(subtract(111, 21)).toBe(90);
5252
});
5353
it("Parameter should only be Numbers", () => {
54-
expect(subtract(3, "4")).toBeFalsy();
54+
expect(subtract(3, "4")).toMatch(/Must be Numbers/);
55+
});
56+
it("Parameter should at least be two", () => {
57+
expect(subtract(3)).toMatch(/only two Numbers/);
58+
});
59+
it("Parameter should not be more than two", () => {
60+
expect(subtract(3, 3, 3, 4)).toMatch(/only two Numbers/);
5561
});
5662
});
5763

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy