Skip to content
This repository has been archived by the owner on Aug 1, 2018. It is now read-only.

Commit

Permalink
Add test for React.Fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGrandon committed Mar 22, 2018
1 parent fda3fb2 commit df1d0d3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/__tests__/__node__/prepare-render.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,19 @@ tape('Preparing an async app with componentWillReceiveProps option', t => {
t.end();
});
});

tape('Preparing a Fragment', t => {
const app = (
<React.Fragment>
<div>1</div>
<div>2</div>
</React.Fragment>
);
const p = prepare(app);
t.ok(p instanceof Promise, 'prepare returns a promise');
p.then(() => {
const wrapper = shallow(app);
t.equal(wrapper.children().length, 2, 'has two children');
t.end();
});
});

0 comments on commit df1d0d3

Please sign in to comment.