@vmz/test 0.3.6 → 0.3.8

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.md CHANGED
@@ -1,55 +1,55 @@
1
- # @vmz/test
2
-
3
- A test that only says “the button now says 2” leaves important product questions unanswered. Did the write also wake
4
- unrelated UI? Did navigation dispose the old async task? Did the browser replay work that SSR had already done? Did a
5
- server-only dependency find its way into the client?
6
-
7
- `@vmz/test` is VMZ's answer to those questions. It tests against the same Program Graph and execution plan that produce
8
- browser output, SSR, resumption, and deployment. That lets a scenario cover ordinary logic and real browser input, but
9
- also routes, loading, cancellation, server capabilities, SSR/resume identity, and traces of the regions that actually
10
- performed work.
11
-
12
- What that gives a product team:
13
-
14
- - **Behavioral confidence:** users can navigate, submit, and interact as expected.
15
- - **Boundary confidence:** server-only work remains server-only; routes and capabilities resolve where they should.
16
- - **Delivery confidence:** SSR and resume describe the same application without accidental replay.
17
- - **Performance confidence:** a trace can show whether unrelated regions woke up.
18
-
19
- The point is not to reject useful tools such as Vitest, Jest, or Playwright. They can remain valuable during migration
20
- or as browser transport. They do not, however, define what VMZ means by a correct application. VMZ keeps that meaning in
21
- one graph and one execution plan, so a failure can be traced to the actual boundary that failed rather than flattened
22
- into a generic test callback.
23
-
24
- Choose `@vmz/test` when you want tests to protect the architectural promises that made you choose VMZ: precise work,
25
- safe server boundaries, SSR that does not needlessly replay, and application behavior that can be explained. 🧪
26
-
27
- ## One scenario, several kinds of evidence
28
-
29
- | Surface | Evidence VMZ can collect |
30
- |--------------|--------------------------------------------------------------------|
31
- | Compile | Diagnostics, graph identities, and generated boundaries |
32
- | Logic | State transitions, derived work, and cancellation |
33
- | Browser | Real input, semantic locators, DOM, accessibility, and screenshots |
34
- | Router | Matched RouteId, layout retention, loading, errors, and disposal |
35
- | SSR / Resume | HTML, serialized state, event entries, and replay avoidance |
36
- | Deployment | Client/server reachability, capabilities, artifacts, and traces |
37
-
38
- ### UI automation without a borrowed worldview
39
-
40
- VMZ can use a real browser protocol as transport while owning locator, action, waiting, and expectation semantics. Tests
41
- can find elements by role, label, text, RouteId, or stable test identity; CSS remains an escape hatch rather than the
42
- default contract.
43
-
44
- Auto-waiting can observe navigation, pending work, region commits, and server activity instead of guessing with
45
- arbitrary delays. A failure can connect the visible symptom to the application work that produced it.
46
-
47
- ### Precision is testable
48
-
49
- A fine-grained compiler should prove that nothing unrelated ran. VMZ tests can check that the intended binding changed,
50
- unrelated computations stayed idle, an obsolete generation was cancelled, and a disposed owner received no late write.
51
- That turns testing into a competitive feature rather than a bundled convenience.
52
-
53
- ## License
54
-
55
- MIT
1
+ # @vmz/test
2
+
3
+ A test that only says “the button now says 2” leaves important product questions unanswered. Did the write also wake
4
+ unrelated UI? Did navigation dispose the old async task? Did the browser replay work that SSR had already done? Did a
5
+ server-only dependency find its way into the client?
6
+
7
+ `@vmz/test` is VMZ's answer to those questions. It tests against the same Program Graph and execution plan that produce
8
+ browser output, SSR, resumption, and deployment. That lets a scenario cover ordinary logic and real browser input, but
9
+ also routes, loading, cancellation, server capabilities, SSR/resume identity, and traces of the regions that actually
10
+ performed work.
11
+
12
+ What that gives a product team:
13
+
14
+ - **Behavioral confidence:** users can navigate, submit, and interact as expected.
15
+ - **Boundary confidence:** server-only work remains server-only; routes and capabilities resolve where they should.
16
+ - **Delivery confidence:** SSR and resume describe the same application without accidental replay.
17
+ - **Performance confidence:** a trace can show whether unrelated regions woke up.
18
+
19
+ The point is not to reject useful tools such as Vitest, Jest, or Playwright. They can remain valuable during migration
20
+ or as browser transport. They do not, however, define what VMZ means by a correct application. VMZ keeps that meaning in
21
+ one graph and one execution plan, so a failure can be traced to the actual boundary that failed rather than flattened
22
+ into a generic test callback.
23
+
24
+ Choose `@vmz/test` when you want tests to protect the architectural promises that made you choose VMZ: precise work,
25
+ safe server boundaries, SSR that does not needlessly replay, and application behavior that can be explained. 🧪
26
+
27
+ ## One scenario, several kinds of evidence
28
+
29
+ | Surface | Evidence VMZ can collect |
30
+ |--------------|--------------------------------------------------------------------|
31
+ | Compile | Diagnostics, graph identities, and generated boundaries |
32
+ | Logic | State transitions, derived work, and cancellation |
33
+ | Browser | Real input, semantic locators, DOM, accessibility, and screenshots |
34
+ | Router | Matched RouteId, layout retention, loading, errors, and disposal |
35
+ | SSR / Resume | HTML, serialized state, event entries, and replay avoidance |
36
+ | Deployment | Client/server reachability, capabilities, artifacts, and traces |
37
+
38
+ ### UI automation without a borrowed worldview
39
+
40
+ VMZ can use a real browser protocol as transport while owning locator, action, waiting, and expectation semantics. Tests
41
+ can find elements by role, label, text, RouteId, or stable test identity; CSS remains an escape hatch rather than the
42
+ default contract.
43
+
44
+ Auto-waiting can observe navigation, pending work, region commits, and server activity instead of guessing with
45
+ arbitrary delays. A failure can connect the visible symptom to the application work that produced it.
46
+
47
+ ### Precision is testable
48
+
49
+ A fine-grained compiler should prove that nothing unrelated ran. VMZ tests can check that the intended binding changed,
50
+ unrelated computations stayed idle, an obsolete generation was cancelled, and a disposed owner received no late write.
51
+ That turns testing into a competitive feature rather than a bundled convenience.
52
+
53
+ ## License
54
+
55
+ MIT
package/dist/compile.js CHANGED
@@ -458,8 +458,8 @@ export function runCompileManifest(manifest, ctx) {
458
458
  }
459
459
  }
460
460
  if (typeof expect.reducedMotion === 'string') {
461
- if (!transitions.every((t) => t.reduced_motion === expect.reducedMotion)) {
462
- fail(`motion.reduced_motion want ${expect.reducedMotion}: ${JSON.stringify(transitions)}`);
461
+ if (!transitions.every((t) => t.reducedMotion === expect.reducedMotion)) {
462
+ fail(`motion.reducedMotion want ${expect.reducedMotion}: ${JSON.stringify(transitions)}`);
463
463
  }
464
464
  }
465
465
  if (expect.hasRegion === true) {
@@ -480,9 +480,9 @@ export function runCompileManifest(manifest, ctx) {
480
480
  }
481
481
  }
482
482
  if (expect.planMotionTransition === true) {
483
- const nodes = (plan?.nodes || []).filter((n) => n.kind === 'motion_transition');
483
+ const nodes = (plan?.nodes || []).filter((n) => n.kind === 'motion-transition');
484
484
  if (!nodes.length)
485
- fail('plan missing motion_transition nodes');
485
+ fail('plan missing motion-transition nodes');
486
486
  }
487
487
  continue;
488
488
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "@vmz/core": "0.3.6",
4
- "@vmz/protocol": "0.3.6",
3
+ "@vmz/core": "0.3.8",
4
+ "@vmz/protocol": "0.3.8",
5
5
  "linkedom": "^0.18.13",
6
6
  "puppeteer-core": "^24.11.2"
7
7
  },
@@ -51,5 +51,5 @@
51
51
  },
52
52
  "type": "module",
53
53
  "types": "./dist/index.d.ts",
54
- "version": "0.3.6"
54
+ "version": "0.3.8"
55
55
  }