diff --git a/Project-Euler/test/Problem003.test.js b/Project-Euler/test/Problem003.test.js new file mode 100644 index 000000000..0f6cf4e6d --- /dev/null +++ b/Project-Euler/test/Problem003.test.js @@ -0,0 +1,12 @@ +import { largestPrime } from '../Problem003.js' + +describe('Largest prime factor', () => { + test('if the number is 13195', () => { + expect(largestPrime(13195)).toBe(29) + }) + // Project Euler Condition Check + test('if the number is 600851475143', () => { + // Default value is same as the tested value + expect(largestPrime()).toBe(6857) + }) +})