Skip to content

Commit

Permalink
[Fix] Fix issue PlatziMaster#29 add new test
Browse files Browse the repository at this point in the history
  • Loading branch information
hyfi06 committed Mar 29, 2020
1 parent e6699a1 commit cc1235d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/_test_/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function primalityTest(testFunction) {
expect(testFunction(199)).toBe(true);

expect(testFunction(-1)).toBe(false);
expect(testFunction(-11)).toBe(false);
expect(testFunction(-6)).toBe(false);
expect(testFunction(0)).toBe(false);
expect(testFunction(4)).toBe(false);
expect(testFunction(6)).toBe(false);
Expand All @@ -29,6 +31,9 @@ function primalityTest(testFunction) {
expect(testFunction(0.5)).toBe(false);
expect(testFunction(1.3)).toBe(false);
expect(testFunction(10.5)).toBe(false);
expect(testFunction(2.4)).toBe(false);
expect(testFunction(2.7)).toBe(false);
expect(testFunction(11.5)).toBe(false);
}

describe('trialDivision', () => {
Expand Down

0 comments on commit cc1235d

Please sign in to comment.