Skip to content

Commit

Permalink
added test for nfl#408
Browse files Browse the repository at this point in the history
  • Loading branch information
AubreyHewes committed Nov 2, 2018
1 parent 6500e28 commit 256593e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/HelmetTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,27 @@ describe("Helmet", () => {
});
});

it("uses a titleTemplate and a child <title>", done => {
ReactDOM.render(
<Helmet
defaultTitle={"Fallback"}
titleTemplate={
"This is a %s of the titleTemplate feature"
}
>
<title>Test</title>
</Helmet>,
container
);

requestAnimationFrame(() => {
expect(document.title).to.equal(
"This is a Test of the titleTemplate feature"
);
done();
});
});

it("uses a titleTemplate if defined", done => {
ReactDOM.render(
<Helmet
Expand Down

0 comments on commit 256593e

Please sign in to comment.