Commit 9d7c3e2
committed
test: Avoid test failures from unlocking undefined stores
With the previous mock, the entire `@wordpress/data` module was
replaced. This led to emptying utilities like `createReduxStore`. This
resulted in other `@wordpress` modules throwing errors when attempting
to act upon stores.
```
FAIL src/utils/editor.test.jsx [ src/utils/editor.test.jsx ]
Error: Cannot unlock an undefined object.
❯ unlock node_modules/@wordpress/private-apis/src/implementation.ts:186:9
❯ node_modules/@wordpress/blocks/src/store/index.js:31:1
❯ node_modules/@wordpress/blocks/src/index.js:11:1
```1 parent 191d555 commit 9d7c3e2
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
0 commit comments