diff --git a/test/assets/levels/missing_EOD.lev b/test/assets/levels/missing_EOD.lev new file mode 100644 index 0000000..6e49631 Binary files /dev/null and b/test/assets/levels/missing_EOD.lev differ diff --git a/test/assets/levels/missing_EOF.lev b/test/assets/levels/missing_EOF.lev new file mode 100644 index 0000000..cc27189 Binary files /dev/null and b/test/assets/levels/missing_EOF.lev differ diff --git a/test/test.js b/test/test.js index 43709ba..653d9da 100644 --- a/test/test.js +++ b/test/test.js @@ -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 * * * * * * * * * */