Skip to content

Commit 648da26

Browse files
author
Daniel Dorado
committed
[UPDATE] Add tests for SieveOfEratosthenesIntArray
1 parent 968ac86 commit 648da26

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { sieveOfEratosthenes } from '../SieveOfEratosthenesIntArray'
2+
import { PrimeCheck } from '../PrimeCheck'
3+
4+
describe('should return an array of prime numbers', () => {
5+
it('should have each element in the array as a prime numbers', () => {
6+
const n = 100
7+
const primes = sieveOfEratosthenes(n)
8+
primes.forEach(prime => {
9+
expect(PrimeCheck(prime)).toBeTruthy()
10+
})
11+
})
12+
})

0 commit comments

Comments
 (0)