2021-07-03 18:27:43 +05:30
|
|
|
import { isEven, isEvenBitwise } from '../IsEven'
|
|
|
|
|
|
2022-03-11 22:46:02 +06:00
|
|
|
describe('Testing isEven function', () => {
|
|
|
|
|
it('should return if the number is even or not', () => {
|
|
|
|
|
const isEvenNumber = isEven(4)
|
|
|
|
|
expect(isEvenNumber).toBe(true)
|
|
|
|
|
})
|
2021-07-03 18:27:43 +05:30
|
|
|
|
2022-03-11 22:46:02 +06:00
|
|
|
it('should return if the number is even or not', () => {
|
|
|
|
|
const isEvenNumber = isEven(7)
|
|
|
|
|
expect(isEvenNumber).toBe(false)
|
|
|
|
|
})
|
2021-07-03 18:27:43 +05:30
|
|
|
})
|
|
|
|
|
|
2022-03-11 22:46:02 +06:00
|
|
|
describe('Testing isEvenBitwise function', () => {
|
|
|
|
|
it('should return if the number is even or not', () => {
|
|
|
|
|
const isEvenNumber = isEvenBitwise(6)
|
|
|
|
|
expect(isEvenNumber).toBe(true)
|
|
|
|
|
})
|
2021-07-03 18:27:43 +05:30
|
|
|
|
2022-03-11 22:46:02 +06:00
|
|
|
it('should return if the number is even or not', () => {
|
|
|
|
|
const isEvenNumber = isEvenBitwise(3)
|
|
|
|
|
expect(isEvenNumber).toBe(false)
|
|
|
|
|
})
|
2021-07-03 18:27:43 +05:30
|
|
|
})
|