Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e826736

Browse files
authored
Update trialDivision.test.js
1 parent 971891f commit e826736

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/algorithms/math/primality-test/__test__/trialDivision.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import trialDivision from '../trialDivision';
44
* @param {function(n: number)} testFunction
55
*/
66
function primalityTest(testFunction) {
7-
expect(testFunction(1)).toBeTruthy();
7+
88
expect(testFunction(2)).toBeTruthy();
99
expect(testFunction(3)).toBeTruthy();
1010
expect(testFunction(5)).toBeTruthy();
@@ -15,6 +15,7 @@ function primalityTest(testFunction) {
1515

1616
expect(testFunction(-1)).toBeFalsy();
1717
expect(testFunction(0)).toBeFalsy();
18+
expect(testFunction(1)).toBeFalsy();
1819
expect(testFunction(4)).toBeFalsy();
1920
expect(testFunction(6)).toBeFalsy();
2021
expect(testFunction(12)).toBeFalsy();

0 commit comments

Comments
 (0)