generated from mariotacke/template-advent-of-code
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
44 lines (39 loc) · 809 Bytes
/
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
42
43
44
const assert = require('assert');
const part1 = require('./part1');
const part2 = require('./part2');
describe('Day 3: Binary Diagnostic', () => {
it('should compute power consumption of the submarine', () => {
const input =
`00100
11110
10110
10111
10101
01111
00111
11100
10000
11001
00010
01010`;
assert.strictEqual(part1(input), 198);
});
describe('Part Two', () => {
it('should compute life support rating of the submarine', () => {
const input =
`00100
11110
10110
10111
10101
01111
00111
11100
10000
11001
00010
01010`;
assert.strictEqual(part2(input), 230);
});
});
});