Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf83f4e9

Browse files
Add some new test cases for subtraction operation
1 parent92e13e0 commitf83f4e9

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(/MustbeNumbers/);
55+
});
56+
it("Parameter should at least be two",()=>{
57+
expect(subtract(3)).toMatch(/onlytwoNumbers/);
58+
});
59+
it("Parameter should not be more than two",()=>{
60+
expect(subtract(3,3,3,4)).toMatch(/onlytwoNumbers/);
5561
});
5662
});
5763

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp