Skip to content

Commit

Permalink
test: functions in nested objects should be bound to that object (han…
Browse files Browse the repository at this point in the history
  • Loading branch information
vassudanagunta committed May 10, 2022
1 parent 88ac068 commit 56ef909
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/basic.js
Expand Up @@ -268,6 +268,21 @@ describe('basic context', function() {
})
.withMessage('functions are bound to the context')
.toCompileTo('More awesome');

expectTemplate('{{nested.awesome}}')
.withInput({
nested: {
awesome: function() {
return this.more;
},
more: 'Deeply awesome'
},
more: 'More awesome'
})
.withMessage(
'functions in nested objects are bound to that object, consistent with JS spec'
)
.toCompileTo('Deeply awesome');
});

it('functions with context argument', function() {
Expand Down

0 comments on commit 56ef909

Please sign in to comment.