Skip to content

Commit

Permalink
add test for tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Jan 20, 2018
1 parent 8f6d551 commit 4ff4237
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ test('does not change main acorn module', function (t) {
})
t.end()
})

test('tokenizes object spread syntax', function (t) {
var tokenizer = acorn.tokenizer('var a = { ...b }')

t.doesNotThrow(function (t) {
while (tokenizer.getToken().type !== acorn.tokTypes.eof) {}
})
t.end()
})

0 comments on commit 4ff4237

Please sign in to comment.