forked from TheAlgorithms/JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIsOdd.test.js
More file actions
25 lines (21 loc) · 694 Bytes
/
IsOdd.test.js
File metadata and controls
25 lines (21 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { isOdd, isOddBitwise } from '../IsOdd'
describe('Testing the isOdd function', () => {
it('should return true, if the number is odd', () => {
const isOddNumber = isOdd(4)
expect(isOddNumber).toBe(false)
})
it('should return true, if the number is odd', () => {
const isOddNumber = isOdd(7)
expect(isOddNumber).toBe(true)
})
})
describe('Testing the isOddBitwise function', () => {
it('should return true, if the number is odd', () => {
const isOddNumber = isOddBitwise(6)
expect(isOddNumber).toBe(false)
})
it('should return true, if the number is odd', () => {
const isOddNumber = isOddBitwise(3)
expect(isOddNumber).toBe(true)
})
})