Skip to content

Commit 9257660

Browse files
committed
Un-nested the new rendering tests. Updated the fiber test passing/not passing lists.
1 parent 5531bf3 commit 9257660

File tree

3 files changed

+40
-23
lines changed

3 files changed

+40
-23
lines changed

scripts/fiber/tests-passing-except-dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,7 @@ src/renderers/dom/shared/__tests__/ReactMountDestruction-test.js
144144

145145
src/renderers/dom/shared/__tests__/ReactServerRendering-test.js
146146
* should have the correct mounting behavior
147+
* should render a blank div with client render on top of bad server markup
148+
* should render a div with inline styles with client render on top of bad server markup
149+
* should render a self-closing tag with client render on top of bad server markup
150+
* should render a self-closing tag as a child with client render on top of bad server markup

scripts/fiber/tests-passing.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,18 @@ src/renderers/dom/shared/__tests__/ReactServerRendering-test.js
11611161
* warns with a no-op when an async replaceState is triggered
11621162
* warns with a no-op when an async forceUpdate is triggered
11631163
* should warn when children are mutated during render
1164+
* should render a blank div with server string render
1165+
* should render a blank div with clean client render
1166+
* should render a blank div with client render on top of good server markup
1167+
* should render a div with inline styles with server string render
1168+
* should render a div with inline styles with clean client render
1169+
* should render a div with inline styles with client render on top of good server markup
1170+
* should render a self-closing tag with server string render
1171+
* should render a self-closing tag with clean client render
1172+
* should render a self-closing tag with client render on top of good server markup
1173+
* should render a self-closing tag as a child with server string render
1174+
* should render a self-closing tag as a child with clean client render
1175+
* should render a self-closing tag as a child with client render on top of good server markup
11641176

11651177
src/renderers/dom/shared/__tests__/escapeTextContentForBrowser-test.js
11661178
* should escape boolean to string

src/renderers/dom/shared/__tests__/ReactServerRendering-test.js

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function expectErrors(fn, count) {
4242
}
4343
}
4444
}
45-
expect(console.error.calls.count()).toBe(count);
45+
expectDev(console.error.calls.count()).toBe(count);
4646
return result;
4747
});
4848
}
@@ -391,28 +391,6 @@ describe('ReactDOMServer', () => {
391391
expect(numClicks).toEqual(2);
392392
});
393393

394-
describe('basic rendering', function() {
395-
itRenders('should render a blank div', render =>
396-
render(<div/>).then(e => expect(e.tagName.toLowerCase()).toBe('div')));
397-
398-
itRenders('should render a div with inline styles', render =>
399-
render(<div style={{color:'red', width:'30px'}}/>).then(e => {
400-
expect(e.style.color).toBe('red');
401-
expect(e.style.width).toBe('30px');
402-
})
403-
);
404-
405-
itRenders('should render a self-closing tag', render =>
406-
render(<br/>).then(e => expect(e.tagName.toLowerCase()).toBe('br')));
407-
408-
itRenders('should render a self-closing tag as a child', render =>
409-
render(<div><br/></div>).then(e => {
410-
expect(e.childNodes.length).toBe(1);
411-
expect(e.firstChild.tagName.toLowerCase()).toBe('br');
412-
})
413-
);
414-
});
415-
416394
it('should throw with silly args', () => {
417395
expect(
418396
ReactDOMServer.renderToString.bind(
@@ -683,4 +661,27 @@ describe('ReactDOMServer', () => {
683661
);
684662
}).toThrowError(/Cannot assign to read only property.*/);
685663
});
664+
665+
describe('basic rendering', function() {
666+
itRenders('should render a blank div', render =>
667+
render(<div/>).then(e => expect(e.tagName.toLowerCase()).toBe('div')));
668+
669+
itRenders('should render a div with inline styles', render =>
670+
render(<div style={{color:'red', width:'30px'}}/>).then(e => {
671+
expect(e.style.color).toBe('red');
672+
expect(e.style.width).toBe('30px');
673+
})
674+
);
675+
676+
itRenders('should render a self-closing tag', render =>
677+
render(<br/>).then(e => expect(e.tagName.toLowerCase()).toBe('br')));
678+
679+
itRenders('should render a self-closing tag as a child', render =>
680+
render(<div><br/></div>).then(e => {
681+
expect(e.childNodes.length).toBe(1);
682+
expect(e.firstChild.tagName.toLowerCase()).toBe('br');
683+
})
684+
);
685+
});
686+
686687
});

0 commit comments

Comments
 (0)