merge: refactor isEven function (#920)

* refactor: formated docs and functions

* refactor: format all test codes
This commit is contained in:
Fahim Faisaal
2022-03-11 22:46:02 +06:00
committed by GitHub
parent 4f6fe1975c
commit da6c22704e
2 changed files with 31 additions and 35 deletions

View File

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