Project euler problem 10 solution and test script

This commit is contained in:
Thivagar Manickam
2021-05-06 21:28:40 +05:30
parent 9f24341b5b
commit 1ce4168664
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import { calculateSumOfPrimeNumbers } from '../Problem10'
describe('checkAnagram', () => {
it('Return the sum of prime numbers upto but less than 14', () => {
const SUT = calculateSumOfPrimeNumbers(14)
expect(SUT).toBe(41)
})
it('Return the sum of prime numbers upto but less than 10', () => {
const SUT = calculateSumOfPrimeNumbers(10)
expect(SUT).toBe(17)
})
it('Return the sum of prime numbers upto but less than 100', () => {
const SUT = calculateSumOfPrimeNumbers(100)
expect(SUT).toBe(1060)
})
})