Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
21 lines (20 loc) · 681 Bytes

File metadata and controls

21 lines (20 loc) · 681 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { multiplesThreeAndFive } from '../Problem001.js'
describe('Sum of multiples of 3 or 5', () => {
it('should throw error when number is negative number', () => {
expect(() => multiplesThreeAndFive(-24)).toThrowError(
'No natural numbers exist below 1'
)
})
it('should throw error when number is 0', () => {
expect(() => multiplesThreeAndFive(0)).toThrowError(
'No natural numbers exist below 1'
)
})
test('if the number is greater than 0', () => {
expect(multiplesThreeAndFive(10)).toBe(23)
})
// Project Euler Condition Check
test('if the number is 1000', () => {
expect(multiplesThreeAndFive(1000)).toBe(233168)
})
})
Morty Proxy This is a proxified and sanitized view of the page, visit original site.