@depository/preact 0.54.0 → 0.55.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 +6 -7
- package/src/hooks/useData.spec.js +2 -4
- package/src/index.spec.js +2 -4
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"type": "module",
|
3
3
|
"name": "@depository/preact",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.55.0",
|
5
5
|
"description": "Preact bindings for depository",
|
6
6
|
"module": "./src/index.js",
|
7
7
|
"exports": {
|
@@ -27,16 +27,15 @@
|
|
27
27
|
"access": "public"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
|
-
"@depository/function-middleware": "^0.
|
31
|
-
"@depository/store": "^0.
|
30
|
+
"@depository/function-middleware": "^0.55.0",
|
31
|
+
"@depository/store": "^0.55.0",
|
32
32
|
"htm": "^3.0.4",
|
33
33
|
"jsdom": "^16.4.0",
|
34
34
|
"mocha": "8.3.2",
|
35
35
|
"mocha-dominate": "^2.0.0",
|
36
36
|
"preact": "^10.5.7",
|
37
|
-
"serve": "^
|
38
|
-
"
|
39
|
-
"unexpected": "12.0.0",
|
37
|
+
"serve": "^12.0.1",
|
38
|
+
"unexpected": "12.0.3",
|
40
39
|
"unexpected-dom": "^4.18.0"
|
41
40
|
},
|
42
41
|
"peerDependencies": {
|
@@ -45,5 +44,5 @@
|
|
45
44
|
"engines": {
|
46
45
|
"node": ">=12"
|
47
46
|
},
|
48
|
-
"gitHead": "
|
47
|
+
"gitHead": "285bbde948bd7ce80bb4579dbb24a4d380b2c339"
|
49
48
|
}
|
@@ -1,14 +1,11 @@
|
|
1
1
|
import unexpected from "unexpected";
|
2
2
|
import unexpectedDom from "unexpected-dom";
|
3
|
-
import simulateEvents from "simulate-events";
|
4
3
|
import { Store } from "@depository/store";
|
5
4
|
import { functionMiddleware } from "@depository/function-middleware";
|
6
5
|
import { StoreProvider, useData, useDispatch } from "./index.js";
|
7
6
|
import { h, render } from "preact";
|
8
7
|
import htm from "htm";
|
9
8
|
|
10
|
-
const simulate = simulateEvents.default;
|
11
|
-
|
12
9
|
const delay = (timeout = 0) =>
|
13
10
|
new Promise((resolve) => {
|
14
11
|
setTimeout(resolve, timeout);
|
@@ -73,7 +70,8 @@ describe("useData", () => {
|
|
73
70
|
});
|
74
71
|
|
75
72
|
it("handles dispatching actions", async () => {
|
76
|
-
|
73
|
+
const incrementButton = container.querySelector("[data-test-id=increment]");
|
74
|
+
incrementButton.dispatchEvent(new CustomEvent("click"));
|
77
75
|
|
78
76
|
await delay();
|
79
77
|
|
package/src/index.spec.js
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
import unexpected from "unexpected";
|
2
2
|
import unexpectedDom from "unexpected-dom";
|
3
|
-
import simulateEvents from "simulate-events";
|
4
3
|
import { Store } from "@depository/store";
|
5
4
|
import { functionMiddleware } from "@depository/function-middleware";
|
6
5
|
import { StoreProvider, connect } from "./index.js";
|
7
6
|
import { h, render } from "preact";
|
8
7
|
import htm from "htm";
|
9
8
|
|
10
|
-
const simulate = simulateEvents.default;
|
11
|
-
|
12
9
|
const delay = (timeout = 0) =>
|
13
10
|
new Promise((resolve) => {
|
14
11
|
setTimeout(resolve, timeout);
|
@@ -73,7 +70,8 @@ describe("preact", () => {
|
|
73
70
|
});
|
74
71
|
|
75
72
|
it("handles dispatching actions", async () => {
|
76
|
-
|
73
|
+
const incrementButton = container.querySelector("[data-test-id=increment]");
|
74
|
+
incrementButton.dispatchEvent(new CustomEvent("click"));
|
77
75
|
|
78
76
|
await delay();
|
79
77
|
|