Created
April 24, 2019 05:58
-
-
Save a6kme/2a82990b39030ebae7b20d9fb455570a to your computer and use it in GitHub Desktop.
Library code in test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test/arithmetic/add.test.js | |
import { add } from '../../src'; | |
test('Two integers should get added up', () => { | |
expect(add(2, 3)).toBe(5); | |
expect(add(-1, 0)).toBe(-1); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test/range/max.test.js | |
import { max } from '../../src'; | |
test('Should give max entry from a given array', () => { | |
expect(max([1, 3, 4])).toBe(4); | |
expect(max([1, 10, 10])).toBe(10); | |
expect(max([-1, -5, 0])).toBe(0); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment