"use strict"; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _react = require('@testing-library/react'); var _runtime = require('@umijs/runtime'); var _react3 = require('react'); var _react4 = _interopRequireDefault(_react3); var _testutils = require('react-dom/test-utils'); var _renderClient = require('./renderClient'); let container; beforeEach(() => { container = document.createElement("div"); container.id = "app"; document.body.appendChild(container); }); afterEach(() => { document.body.removeChild(container); container = null; _react.cleanup.call(void 0, ); }); test("normal", () => { const plugin = new (0, _runtime.Plugin)({ validKeys: ["rootContainer"] }); plugin.register({ apply: { rootContainer(container3, args) { if (!(args.plugin && args.routes)) { throw new Error("history, plugin or routes not exists in the args of rootContainer"); } return /* @__PURE__ */ _react4.default.createElement("div", null, /* @__PURE__ */ _react4.default.createElement("h1", null, "root container"), container3); } }, path: "/foo" }); const routes = [ {path: "/foo", component: () => /* @__PURE__ */ _react4.default.createElement("h1", null, "foo")}, {path: "/bar", component: () => /* @__PURE__ */ _react4.default.createElement("h1", null, "bar")} ]; const {container: container1} = _react.render.call(void 0, _renderClient.renderClient.call(void 0, { plugin, routes, path: "/foo" })); expect(container1.innerHTML).toEqual("