Skip to content

Commit

Permalink
Add test for mounting into a document fragment (#11047)
Browse files Browse the repository at this point in the history
  • Loading branch information
aweary authored and gaearon committed Oct 3, 2017
1 parent c32b4cd commit 5f93ee6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1141,4 +1141,12 @@ describe('ReactDOMFiber', () => {
expect(actualDocument).toBe(iframeDocument);
expect(iframeContainer.appendChild).toHaveBeenCalledTimes(1);
});

it('should mount into a document fragment', () => {
var fragment = document.createDocumentFragment();
ReactDOM.render(<div>foo</div>, fragment);
expect(container.innerHTML).toBe('');
container.appendChild(fragment);
expect(container.innerHTML).toBe('<div>foo</div>');
});
});

0 comments on commit 5f93ee6

Please sign in to comment.