Skip to content

Commit

Permalink
add test for null pointer in section data key
Browse files Browse the repository at this point in the history
shaman-apprentice authored and shaman-apprentice committed May 16, 2019
1 parent 5c7eed9 commit 7079cf6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/transformers/test/section.test.js
Original file line number Diff line number Diff line change
@@ -31,6 +31,10 @@ test('data binding in list with null pointer exception', () => {
expectTemplatesInnerHTML('{{#list}}{{x.y}}{{/list}}', data)
})

test('data binding with null pointer exception in key', () => {
expectTemplatesInnerHTML('{{#a.b}}BUH{{/a.b}}', {})
})

test('section without end tag', () => {
const template = '{{#list}}{{x}}{{/lst}}'
const data = { list: [ {x:1}, {x:2} ] }

0 comments on commit 7079cf6

Please sign in to comment.