Skip to content

Commit

Permalink
Fix failing IE test (#2267)
Browse files Browse the repository at this point in the history
IE will display falsy attribute as an empty string whereas other
browsers will remove it completely.
Only happens when innerHTML is used.
  • Loading branch information
marvinhagemeister committed Jan 21, 2020
1 parent 4cb1119 commit d439563
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/browser/render.test.js
Expand Up @@ -1402,10 +1402,10 @@ describe('render()', () => {
const childContainer = newScratch.querySelector('#child');

render(<App />, childContainer);
expect(childContainer.innerHTML.trim()).to.equal('<span>App</span>');
expect(serializeHtml(childContainer)).to.equal('<span>App</span>');
expect(mount).to.be.calledOnce;
render(<div />, newScratch, newScratch.firstElementChild);
expect(newScratch.innerHTML.trim()).to.equal('<div id=""></div>');
expect(serializeHtml(newScratch)).to.equal('<div id=""></div>');
expect(unmount).to.be.calledOnce;

newScratch.parentNode.removeChild(newScratch);
Expand Down

0 comments on commit d439563

Please sign in to comment.