/**
* 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';
jest.resetModules();
const React = require('react');
let ReactFreshRuntime;
if (__DEV__) {
ReactFreshRuntime = require('react-refresh/runtime');
ReactFreshRuntime.injectIntoGlobalHook(global);
}
const ReactDOMClient = require('react-dom/client');
const act = require('internal-test-utils').act;
jest.resetModules();
const ReactART = require('react-art');
const ARTSVGMode = require('art/modes/svg');
const ARTCurrentMode = require('art/modes/current');
ARTCurrentMode.setCurrent(ARTSVGMode);
describe('ReactFresh', () => {
let container;
beforeEach(() => {
if (__DEV__) {
container = document.createElement('div');
document.body.appendChild(container);
}
});
afterEach(() => {
if (__DEV__) {
document.body.removeChild(container);
container = null;
}
});
it('can update components managed by different renderers independently', async () => {
if (__DEV__) {
const InnerV1 = function () {
return