feat: add support for React@18 in backward compatible way (#9435)
Any React version matching this semver is supported: >= 16.8 < 19 Refs #8126 Refs #8414
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { JSDOM } from "jsdom"
|
||||
import Enzyme from "enzyme"
|
||||
import Adapter from "@wojtekmaj/enzyme-adapter-react-17"
|
||||
const { default: Adapter } = require("@cfaester/enzyme-adapter-react-18")
|
||||
|
||||
import win from "../../src/core/window"
|
||||
|
||||
@@ -29,7 +29,7 @@ function setUpDomEnvironment() {
|
||||
}
|
||||
copyProps(win, window) // use UI's built-in window wrapper
|
||||
copyProps(window, global)
|
||||
|
||||
|
||||
// https://github.com/jsdom/jsdom/issues/1721
|
||||
if (typeof global.window.URL.createObjectURL === "undefined") {
|
||||
Object.defineProperty(global.window.URL, "createObjectURL", { value: () => "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==" })
|
||||
|
||||
Reference in New Issue
Block a user