From e23f4fb0470be4246c42b62e2a238e5398914aed Mon Sep 17 00:00:00 2001 From: Kasey Cowley Date: Tue, 9 May 2017 11:53:15 -0600 Subject: [PATCH] test: Add failing test for page title with expressions (#272) --- test/HelmetDeclarativeTest.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/HelmetDeclarativeTest.js b/test/HelmetDeclarativeTest.js index d9d3f28d..331c704e 100644 --- a/test/HelmetDeclarativeTest.js +++ b/test/HelmetDeclarativeTest.js @@ -46,6 +46,23 @@ describe("Helmet - Declarative API", () => { }); }); + it("updates page title and allows children containing expressions", (done) => { + const someValue = "Some Great Title"; + + ReactDOM.render( + + Title: {someValue} + , + container + ); + + requestIdleCallback(() => { + expect(document.title).to.equal("Title: Some Great Title"); + + done(); + }); + }); + it("updates page title with multiple children", (done) => { ReactDOM.render(