Skip to content

Commit faaebcb

Browse files
test(2018 day-12): test for expected output with padded arrays
1 parent bc721de commit faaebcb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

2018/day-12/plants.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ describe('--- Day 12: Subterranean Sustainability ---', () => {
6262
describe('advance()', () => {
6363
it('advances the next generation', () => {
6464
const expected = [
65+
{ position: -6, state: '.' },
66+
{ position: -5, state: '.' },
67+
{ position: -4, state: '.' },
6568
{ position: -3, state: '.' },
6669
{ position: -2, state: '.' },
6770
{ position: -1, state: '.' },
@@ -92,7 +95,10 @@ describe('--- Day 12: Subterranean Sustainability ---', () => {
9295
{ position: 24, state: '#' },
9396
{ position: 25, state: '.' },
9497
{ position: 26, state: '.' },
95-
{ position: 27, state: '.' }
98+
{ position: 27, state: '.' },
99+
{ position: 28, state: '.' },
100+
{ position: 29, state: '.' },
101+
{ position: 30, state: '.' }
96102
]
97103
let plantTracker = new Plants(initialState, rules)
98104
plantTracker.advance()

0 commit comments

Comments
 (0)