@wordpress/jest-preset-default 11.10.0 → 11.11.1
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 +4 -4
- package/scripts/setup-globals.js +3 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/jest-preset-default",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.11.1",
|
|
4
4
|
"description": "Default Jest preset for WordPress development.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
],
|
|
31
31
|
"main": "index.js",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@wordpress/jest-console": "^7.
|
|
34
|
-
"babel-jest": "^29.
|
|
33
|
+
"@wordpress/jest-console": "^7.11.1",
|
|
34
|
+
"babel-jest": "^29.6.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@babel/core": ">=7",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "bb1fbf87bb0f451744530fc6a85de2dff1263bed"
|
|
44
44
|
}
|
package/scripts/setup-globals.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// Run all tests with development tools enabled.
|
|
2
|
+
global.SCRIPT_DEBUG = true;
|
|
3
|
+
|
|
1
4
|
// These are necessary to load TinyMCE successfully.
|
|
2
5
|
global.URL = window.URL;
|
|
3
6
|
global.window.tinyMCEPreInit = {
|
|
@@ -49,12 +52,5 @@ global.window.matchMedia = () => ( {
|
|
|
49
52
|
removeEventListener: () => {},
|
|
50
53
|
} );
|
|
51
54
|
|
|
52
|
-
// Setup fake localStorage.
|
|
53
|
-
const storage = {};
|
|
54
|
-
global.window.localStorage = {
|
|
55
|
-
getItem: ( key ) => ( key in storage ? storage[ key ] : null ),
|
|
56
|
-
setItem: ( key, value ) => ( storage[ key ] = value ),
|
|
57
|
-
};
|
|
58
|
-
|
|
59
55
|
// UserSettings global.
|
|
60
56
|
global.window.userSettings = { uid: 1 };
|