forked from TheAlgorithms/JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIsEven.test.js
More file actions
25 lines (21 loc) · 711 Bytes
/
IsEven.test.js
File metadata and controls
25 lines (21 loc) · 711 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 { isEven, isEvenBitwise } from '../IsEven'
describe('Testing isEven function', () => {
it('should return if the number is even or not', () => {
const isEvenNumber = isEven(4)
expect(isEvenNumber).toBe(true)
})
it('should return if the number is even or not', () => {
const isEvenNumber = isEven(7)
expect(isEvenNumber).toBe(false)
})
})
describe('Testing isEvenBitwise function', () => {
it('should return if the number is even or not', () => {
const isEvenNumber = isEvenBitwise(6)
expect(isEvenNumber).toBe(true)
})
it('should return if the number is even or not', () => {
const isEvenNumber = isEvenBitwise(3)
expect(isEvenNumber).toBe(false)
})
})