Skip to content

Commit

Permalink
Test that server markup only contains the text once
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosichert committed Oct 26, 2016
1 parent 8526359 commit 1f53be4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/Truncate.js
Expand Up @@ -50,7 +50,7 @@ describe('<Truncate />', () => {

describe('in a server environment', () => {
it('should render initial static markup', () => {
renderToString(
const markup = renderToString(
<Truncate
lines={2}
ellipsis='…'
Expand All @@ -59,6 +59,12 @@ describe('<Truncate />', () => {
Some text inside of here
</Truncate>
);

expect(
markup.match(/Some text inside of here/g).length,
'to be',
1
);
});
});

Expand Down

0 comments on commit 1f53be4

Please sign in to comment.