Skip to content

Commit

Permalink
Add test for null handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mwest1066 committed Apr 5, 2022
1 parent e1b38f7 commit 48be0d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/html/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ describe('html', () => {
it('omits boolean values from template', () => {
assert.equal(html`<p>${true}${false}</p>`.toString(), '<p></p>');
});

it('omits nullish values from template', () => {
assert.equal(html`<p>${null}${undefined}</p>`.toString(), '<p></p>');
});
});

describe('escapeHtml', () => {
Expand Down

0 comments on commit 48be0d2

Please sign in to comment.