-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
41 lines (28 loc) · 1.35 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const assert = require('assert');
const marble = require('./marble');
describe('Day 9: Marble Mania', () => {
it('should calculate high score for 9 players; last marble is worth 25 points', () => {
const input = '9 players; last marble is worth 25 points';
assert.strictEqual(marble(input), 32);
});
it('should calculate high score for 10 players; last marble is worth 1618 points', () => {
const input = '10 players; last marble is worth 1618 points';
assert.strictEqual(marble(input), 8317);
});
it('should calculate high score for 13 players; last marble is worth 7999 points', () => {
const input = '13 players; last marble is worth 7999 points';
assert.strictEqual(marble(input), 146373);
});
it('should calculate high score for 17 players; last marble is worth 1104 points', () => {
const input = '17 players; last marble is worth 1104 points';
assert.strictEqual(marble(input), 2764);
});
it('should calculate high score for 21 players; last marble is worth 6111 points', () => {
const input = '21 players; last marble is worth 6111 points';
assert.strictEqual(marble(input), 54718);
});
it('should calculate high score for 30 players; last marble is worth 5807 points', () => {
const input = '30 players; last marble is worth 5807 points';
assert.strictEqual(marble(input), 37305);
});
});