Skip to content

Commit 4ff4237

Browse files
committed
add test for tokenizer
1 parent 8f6d551 commit 4ff4237

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ test('does not change main acorn module', function (t) {
2020
})
2121
t.end()
2222
})
23+
24+
test('tokenizes object spread syntax', function (t) {
25+
var tokenizer = acorn.tokenizer('var a = { ...b }')
26+
27+
t.doesNotThrow(function (t) {
28+
while (tokenizer.getToken().type !== acorn.tokTypes.eof) {}
29+
})
30+
t.end()
31+
})

0 commit comments

Comments
 (0)