fix: support number elements in jsx templates

This commit is contained in:
M. George Hansen 2020-06-02 15:38:39 -07:00
parent fc6480c531
commit bda8e216e2
3 changed files with 16 additions and 1 deletions

View file

@ -61,4 +61,10 @@ testSuite("renderPage", ({ test, expect }) => {
"<!DOCTYPE html><html>There are three lights!</html>"
);
});
test("renders spliced number nodes", () => {
const nLights = 3;
const html = renderPage(<html>There are {nLights} lights!</html>);
expect(html).toEqual("<!DOCTYPE html><html>There are 3 lights!</html>");
});
});