Skip to content

Commit

Permalink
Remove a duplicate test in render tests (and add additional chi… (#1847)
Browse files Browse the repository at this point in the history
* Remove a duplicate test in render tests

* Check childNodes in tests for falsy values
  • Loading branch information
OrKoN authored and ForsakenHarmony committed Aug 10, 2019
1 parent 97c0a2c commit 52ab905
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/browser/render.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ describe('render()', () => {
logCall(Element.prototype, 'remove');
});

it('should render nothing node given null', () => {
render(null, scratch);
let c = scratch.childNodes;
expect(c).to.have.length(0);
});

it('should render an empty text node given an empty string', () => {
render('', scratch);
let c = scratch.childNodes;
Expand Down Expand Up @@ -163,21 +157,25 @@ describe('render()', () => {
it('should not render null', () => {
render(null, scratch);
expect(scratch.innerHTML).to.equal('');
expect(scratch.childNodes).to.have.length(0);
});

it('should not render undefined', () => {
render(undefined, scratch);
expect(scratch.innerHTML).to.equal('');
expect(scratch.childNodes).to.have.length(0);
});

it('should not render boolean true', () => {
render(true, scratch);
expect(scratch.innerHTML).to.equal('');
expect(scratch.childNodes).to.have.length(0);
});

it('should not render boolean false', () => {
render(false, scratch);
expect(scratch.innerHTML).to.equal('');
expect(scratch.childNodes).to.have.length(0);
});

it('should not render children when using function children', () => {
Expand Down

0 comments on commit 52ab905

Please sign in to comment.