Skip to content

Commit

Permalink
fix: make fallback case explicit in unit tests (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jairo-bc authored Dec 1, 2023
1 parent e3610a7 commit 2cacbed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/helpers/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ describe('partial and block helpers', function () {
});
});

it('should not trigger an error if partial name is empty', function (done) {
it('should not trigger an error if partial name is empty, fallback case used instead', function (done) {
var templates = {
template: '{{#partial}}World{{/partial}}{{> layout}}',
layout: 'Hello{{#block "page"}}{{/block}}',
template: '{{#partial }}World{{/partial}}{{> layout}}',
layout: 'Hello{{#block "page"}} Brave New World{{/block}}',
};

render('template', {}, {}, {}, templates).then(result => {
expect(result).to.be.equal('Hello');
expect(result).to.be.equal('Hello Brave New World');
done();
});
});
Expand Down

0 comments on commit 2cacbed

Please sign in to comment.