@wcstack/testing 4.0.4 → 4.1.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/README.ja.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  `<wcs-state>` のページは素の DOM なので、happy-dom で既にヘッドレスにテストできます — レシピは [state README](../state/README.ja.md#ページをテストする) にあり、テスト専用 API は要りません。`@wcstack/testing` はそのレシピをパッケージにしたもの: HTML をマウントし、全要素と全バインドを待ち、state を読み書きし、settle して assert する。便利であって必須ではなく、素のレシピはこのパッケージ無しでも動き続けます。
8
8
 
9
+ 対象は `<wcs-state>` のページです。`@wcstack/signals` で作ったページには `state()` が返す状態の木がありません: その signal・コンポーネント・`bindNode` の配線を、vitest + happy-dom で直接テストします。
10
+
9
11
  ```ts
10
12
  import { mount, settle, fire } from "@wcstack/testing";
11
13
 
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  A `<wcs-state>` page is plain DOM, so it already tests headlessly with happy-dom — the recipe is in the [state README](../state/README.md#testing-your-page) and needs no test-only API. `@wcstack/testing` is that recipe packaged: mount the HTML, wait for every element and binding, read and write the state, settle, assert. It is a convenience, not a requirement; the bare recipe keeps working without it.
8
8
 
9
+ It is for `<wcs-state>` pages. A page built on `@wcstack/signals` has no state tree for `state()` to return: test its signals, components and `bindNode` wiring directly under vitest + happy-dom.
10
+
9
11
  ```ts
10
12
  import { mount, settle, fire } from "@wcstack/testing";
11
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wcstack/testing",
3
- "version": "4.0.4",
3
+ "version": "4.1.1",
4
4
  "description": "Headless test helpers for wcstack pages: mount HTML under happy-dom, await bindings, read/write state, settle updates - the README recipe as one import.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.esm.js",
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "license": "MIT",
45
45
  "peerDependencies": {
46
- "@wcstack/server": "^4.0.4",
47
- "@wcstack/state": "^4.0.4",
46
+ "@wcstack/server": "^4.1.1",
47
+ "@wcstack/state": "^4.1.1",
48
48
  "happy-dom": ">=20"
49
49
  },
50
50
  "peerDependenciesMeta": {