Skip to content

Commit 9d0af42

Browse files
test: specs an input for 2019-day-01
1 parent 8709351 commit 9d0af42

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* eslint-env mocha */
2+
const expect = require('chai').expect
3+
const { calculateFuel } = require('./fuel-calculator')
4+
5+
describe('2019 Day 01', () => {
6+
it('calculates the fuel amount for a specified mass', () => {
7+
const inputs = [12, 14, 1969, 100756]
8+
const outputs = [2, 2, 654, 33583]
9+
10+
inputs.forEach((input, idx) => {
11+
console.log(input)
12+
expect(calculateFuel(input)).equals(outputs[idx])
13+
})
14+
})
15+
})

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require('./2018/day-14/solution')
1+
require('./2019/day-01/part-1/solution')

0 commit comments

Comments
 (0)