Add tests for isOdd snippet

This commit is contained in:
Angelos Chalaris
2019-09-28 13:14:36 +03:00
parent 2291cfe884
commit 9a8d24e92a
6 changed files with 22 additions and 3 deletions

11
test/isOdd.test.js Normal file
View File

@ -0,0 +1,11 @@
const {isOdd} = require('./_30s.js');
test('isOdd is a Function', () => {
expect(isOdd).toBeInstanceOf(Function);
});
test('4 is not an odd number', () => {
expect(isOdd(4)).toBeFalsy();
});
test('5 is an odd number', () => {
expect(isOdd(5)).toBeTruthy();
});