/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails react-core */ 'use strict'; describe('ReactDOMOption', () => { let React; let ReactDOMClient; let ReactDOMServer; let act; let assertConsoleErrorDev; beforeEach(() => { jest.resetModules(); React = require('react'); ReactDOMClient = require('react-dom/client'); ReactDOMServer = require('react-dom/server'); act = require('internal-test-utils').act; assertConsoleErrorDev = require('internal-test-utils').assertConsoleErrorDev; }); async function renderIntoDocument(children) { const container = document.createElement('div'); const root = ReactDOMClient.createRoot(container); await act(async () => root.render(children)); return container; } it('should flatten children to a string', async () => { const stub = ( ); const container = await renderIntoDocument(stub); expect(container.firstChild.innerHTML).toBe('1 foo'); }); it('should warn for invalid child tags', async () => { const el = (