1. /**
    
  2.  * Copyright (c) Meta Platforms, Inc. and affiliates.
    
  3.  *
    
  4.  * This source code is licensed under the MIT license found in the
    
  5.  * LICENSE file in the root directory of this source tree.
    
  6.  *
    
  7.  * @emails react-core
    
  8.  * @jest-environment ./scripts/jest/ReactDOMServerIntegrationEnvironment
    
  9.  */
    
  10. 
    
  11. 'use strict';
    
  12. 
    
  13. let React;
    
  14. let ReactDOMFizzServer;
    
  15. 
    
  16. describe('ReactDOMFloat', () => {
    
  17.   beforeEach(() => {
    
  18.     jest.resetModules();
    
  19. 
    
  20.     React = require('react');
    
  21.     ReactDOMFizzServer = require('react-dom/server');
    
  22.   });
    
  23. 
    
  24.   // fixes #27177
    
  25.   // @gate enableFloat
    
  26.   it('does not hoist above the <html> tag', async () => {
    
  27.     const result = ReactDOMFizzServer.renderToString(
    
  28.       <html>
    
  29.         <head>
    
  30.           <script src="foo" />
    
  31.           <meta charSet="utf-8" />
    
  32.           <title>title</title>
    
  33.         </head>
    
  34.       </html>,
    
  35.     );
    
  36. 
    
  37.     expect(result).toEqual(
    
  38.       '<html><head><meta charSet="utf-8"/><title>title</title><script src="foo"></script></head></html>',
    
  39.     );
    
  40.   });
    
  41. });