test(test:unit-jest): fix all failing tests for this script

We needed to align new cheerio and enzyme
APIS with tests.

Refs #7341
This commit is contained in:
Vladimir Gorej
2021-06-10 17:15:54 +02:00
parent b504579d26
commit 14f9b40ef2
8 changed files with 61 additions and 65 deletions

View File

@@ -1,8 +1,10 @@
import win from "../../src/core/window"
// import { configure } from "enzyme" // enzyme@3
// import Adapter from "enzyme-adapter-react-15" // enzyme@3
import { JSDOM } from "jsdom"
import Enzyme from "enzyme"
import Adapter from "@wojtekmaj/enzyme-adapter-react-17"
import win from "../../src/core/window"
Enzyme.configure({ adapter: new Adapter() })
function copyProps(src, target) {
const props = Object.getOwnPropertyNames(src)