@wordpress/jest-preset-default 8.0.1 → 8.0.2-next.a55ed9455a.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/jest-preset-default",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2-next.a55ed9455a.0",
|
|
4
4
|
"description": "Default Jest preset for WordPress development.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"main": "index.js",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1",
|
|
35
|
-
"@wordpress/jest-console": "^5.0.
|
|
35
|
+
"@wordpress/jest-console": "^5.0.2-next.a55ed9455a.0",
|
|
36
36
|
"babel-jest": "^27.4.5",
|
|
37
37
|
"enzyme": "^3.11.0",
|
|
38
38
|
"enzyme-to-json": "^3.4.4"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "c5108185851b824d531bce55991a3589947e8551"
|
|
50
50
|
}
|
package/scripts/setup-globals.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// These are necessary to load TinyMCE successfully
|
|
1
|
+
// These are necessary to load TinyMCE successfully.
|
|
2
2
|
global.URL = window.URL;
|
|
3
3
|
global.window.tinyMCEPreInit = {
|
|
4
4
|
// Without this, TinyMCE tries to determine its URL by looking at the
|
|
@@ -23,7 +23,7 @@ global.window.cancelAnimationFrame = function cancelAnimationFrame( handle ) {
|
|
|
23
23
|
return clearTimeout( handle );
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
// Ignoring `options` argument since we unconditionally schedule this ASAP
|
|
26
|
+
// Ignoring `options` argument since we unconditionally schedule this ASAP.
|
|
27
27
|
global.window.requestIdleCallback = function requestIdleCallback( callback ) {
|
|
28
28
|
const start = Date.now();
|
|
29
29
|
|
|
@@ -47,12 +47,12 @@ global.window.matchMedia = () => ( {
|
|
|
47
47
|
removeListener: () => {},
|
|
48
48
|
} );
|
|
49
49
|
|
|
50
|
-
// Setup fake localStorage
|
|
50
|
+
// Setup fake localStorage.
|
|
51
51
|
const storage = {};
|
|
52
52
|
global.window.localStorage = {
|
|
53
53
|
getItem: ( key ) => ( key in storage ? storage[ key ] : null ),
|
|
54
54
|
setItem: ( key, value ) => ( storage[ key ] = value ),
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
// UserSettings global
|
|
57
|
+
// UserSettings global.
|
|
58
58
|
global.window.userSettings = { uid: 1 };
|
|
@@ -11,7 +11,7 @@ jest.mock( 'enzyme', () => {
|
|
|
11
11
|
if ( ! mockEnzymeSetup ) {
|
|
12
12
|
mockEnzymeSetup = true;
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// Configure enzyme 3 for React, from docs: http://airbnb.io/enzyme/docs/installation/index.html
|
|
15
15
|
const Adapter = jest.requireActual(
|
|
16
16
|
'@wojtekmaj/enzyme-adapter-react-17'
|
|
17
17
|
);
|