Skip to content

Commit f232269

Browse files
committed
Update Float
1 parent 987bb1f commit f232269

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/react-dom/src/__tests__/ReactDOMFloat-test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@ describe('ReactDOMFloat', () => {
250250
node.tagName !== 'TEMPLATE' &&
251251
node.tagName !== 'template' &&
252252
!node.hasAttribute('hidden') &&
253-
!node.hasAttribute('aria-hidden'))
253+
!node.hasAttribute('aria-hidden') &&
254+
// Ignore the render blocking expect
255+
(node.getAttribute('rel') !== 'expect' ||
256+
node.getAttribute('blocking') !== 'render'))
254257
) {
255258
const props = {};
256259
const attributes = node.attributes;
@@ -690,7 +693,9 @@ describe('ReactDOMFloat', () => {
690693
pipe(writable);
691694
});
692695
expect(chunks).toEqual([
693-
'<!DOCTYPE html><html><head><script async="" src="foo"></script><title>foo</title></head><body>bar',
696+
'<!DOCTYPE html><html><head><script async="" src="foo"></script>' +
697+
'<link rel="expect" href="#«R»" blocking="render"/><title>foo</title></head>' +
698+
'<body>bar<template id="«R»"></template>',
694699
'</body></html>',
695700
]);
696701
});

packages/react-dom/src/__tests__/ReactDOMLegacyFloat-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ describe('ReactDOMFloat', () => {
3434
);
3535

3636
expect(result).toEqual(
37-
'<html><head><meta charSet="utf-8"/><title>title</title><script src="foo"></script></head></html>',
37+
'<html><head><meta charSet="utf-8"/><link rel="expect" href="#«R»" blocking="render"/>' +
38+
'<title>title</title><script src="foo"></script></head><template id="«R»"></template></html>',
3839
);
3940
});
4041
});

0 commit comments

Comments
 (0)