mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
merge: refactor isEven function (#920)
* refactor: formated docs and functions * refactor: format all test codes
This commit is contained in:
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user