Skip to content

Commit aa1a160

Browse files
author
Jeff Escalante
committed
one more test to complete coverage
1 parent 88e1c05 commit aa1a160

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/fixtures/loop_no_in.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<p>x</p>
2+
<each loop="item, index of 5">
3+
<p>{{index}}: {{item}}</p>
4+
</each>
5+
<p>x</p>

test/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ test('loop - no loop arguments', (t) => {
113113
})
114114
})
115115

116+
test('loop - no "in" keyword', (t) => {
117+
return expectError('loop_no_in', (err) => {
118+
t.truthy(err.toString() === "Error: Loop statement lacking 'in' keyword")
119+
})
120+
})
121+
116122
test('loop - expression error', (t) => {
117123
return expectError('loop_expression_error', (err) => {
118124
t.truthy(err.toString() === 'SyntaxError: Unexpected token ILLEGAL')

0 commit comments

Comments
 (0)