Skip to content

Commit

Permalink
Add test for mounting into a document fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Dail committed Oct 2, 2017
1 parent e7a2ac9 commit 4e1d629
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 4e1d629

Please sign in to comment.