-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
This will help to support usage such as:
test.beforeEach(t => {
t.context.game = new Game()
})
test.each(
[
{ c1: 1, c2: 2, dir: 'west' },
{ c1: 2, c2: 3, dir: 'south' },
{ c1: 3, c2: 4, dir: 'east' },
{ c1: 4, c2: 5, dir: 'north' }
], t => {
const { game, c1, c2, dir } = t.context
game.createAndConnectCaverns(c1, c2, dir)
const p = game.createPlayerIn(c1)
p.move(dir)
t.is(p.location, c2)
})
bernardoadcbernardoadc
Metadata
Metadata
Assignees
Labels
No labels