Skip to content

Commit

Permalink
test: Add failing test for page title with expressions (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaseyjcowley authored and cwelch5 committed May 9, 2017
1 parent a39211b commit e23f4fb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/HelmetDeclarativeTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<Helmet>
<title>Title: {someValue}</title>
</Helmet>,
container
);

requestIdleCallback(() => {
expect(document.title).to.equal("Title: Some Great Title");

done();
});
});

it("updates page title with multiple children", (done) => {
ReactDOM.render(
<div>
Expand Down

0 comments on commit e23f4fb

Please sign in to comment.