Added jest file in tests, added description and normal even number test(divisibility by 2 )

This commit is contained in:
AbhinavXT
2021-07-03 18:27:43 +05:30
parent 121357476e
commit 709de83feb
2 changed files with 64 additions and 6 deletions

21
Maths/test/IsEven.test.js Normal file
View File

@@ -0,0 +1,21 @@
import { isEven, isEvenBitwise } from '../IsEven'
test('should return if the number is even or not', () => {
const isEvenNumber = isEven(4)
expect(isEvenNumber).toBe(true)
})
test('should return if the number is even or not', () => {
const isEvenNumber = isEven(7)
expect(isEvenNumber).toBe(false)
})
test('should return if the number is even or not', () => {
const isEvenNumber = isEvenBitwise(6)
expect(isEvenNumber).toBe(true)
})
test('should return if the number is even or not', () => {
const isEvenNumber = isEvenBitwise(3)
expect(isEvenNumber).toBe(false)
})