mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 01:18:23 +08:00
9 lines
281 B
JavaScript
9 lines
281 B
JavaScript
import { newGeneration } from '../ConwaysGameOfLife'
|
|
|
|
describe('newGeneration', () => {
|
|
it('should produce the next generation according to the rules', () => {
|
|
expect(newGeneration([[0, 1, 0], [0, 1, 0], [0, 1, 0]]))
|
|
.toEqual([[0, 0, 0], [1, 1, 1], [0, 0, 0]])
|
|
})
|
|
})
|