Skip to content

Commit

Permalink
feat(test): add tests for level marker values
Browse files Browse the repository at this point in the history
  • Loading branch information
hexjelly committed Jan 30, 2017
1 parent 28303e7 commit 70384e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Binary file added test/assets/levels/missing_EOD.lev
Binary file not shown.
Binary file added test/assets/levels/missing_EOF.lev
Binary file not shown.
14 changes: 14 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,20 @@ test('Invalid object value gives error', t => {
}).catch(error => t.pass(error))
})

test('Wrong end-of-data marker value gives error', t => {
t.plan(1)
return Level.load('test/assets/levels/missing_EOD.lev').then(level => {
t.fail('Should not load')
}).catch(error => t.pass(error))
})

test('Wrong end-of-file marker value gives error', t => {
t.plan(1)
return Level.load('test/assets/levels/missing_EOF.lev').then(level => {
t.fail('Should not load')
}).catch(error => t.pass(error))
})

/* * * * * * * * *
* Replay tests *
* * * * * * * * */
Expand Down

0 comments on commit 70384e8

Please sign in to comment.