@unframework.dev/testing 0.2.0 → 0.2.2

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.
Files changed (123) hide show
  1. package/dist/browser/axe.js +1 -2
  2. package/dist/browser/behaviour.js +1 -2
  3. package/dist/browser/capabilities.js +2 -3
  4. package/dist/browser/clock.d.ts +1 -3
  5. package/dist/browser/clock.js +1 -2
  6. package/dist/browser/console.d.ts +1 -3
  7. package/dist/browser/console.js +1 -2
  8. package/dist/browser/determinism.js +1 -2
  9. package/dist/browser/element-timeout.js +1 -2
  10. package/dist/browser/events.js +1 -2
  11. package/dist/browser/geometry.js +1 -2
  12. package/dist/browser/keys.js +1 -2
  13. package/dist/browser/matchers.d.ts +1 -3
  14. package/dist/browser/matchers.js +4 -5
  15. package/dist/browser/navigation.js +1 -2
  16. package/dist/browser/parity.d.ts +3 -5
  17. package/dist/browser/parity.js +3 -4
  18. package/dist/browser/spec.d.ts +2 -4
  19. package/dist/browser/spec.js +6 -7
  20. package/dist/browser/target.d.ts +1 -3
  21. package/dist/browser/target.js +1 -2
  22. package/dist/browser/text-runs.js +1 -2
  23. package/dist/browser/thrown.js +3 -4
  24. package/dist/browser/trace.d.ts +1 -3
  25. package/dist/browser/trace.js +0 -1
  26. package/dist/browser/user.d.ts +1 -3
  27. package/dist/browser/user.js +1 -2
  28. package/dist/browser/view.d.ts +2 -4
  29. package/dist/browser/view.js +8 -9
  30. package/dist/browser/visual.d.ts +2 -4
  31. package/dist/browser/visual.js +1 -2
  32. package/dist/cli.d.ts +1 -3
  33. package/dist/cli.js +1 -2
  34. package/dist/commands.d.ts +1 -3
  35. package/dist/config/broadcast.js +1 -2
  36. package/dist/config/cases.d.ts +1 -3
  37. package/dist/config/cases.js +1 -2
  38. package/dist/config/index.d.ts +0 -2
  39. package/dist/config/index.js +2 -3
  40. package/dist/config/project-vite.d.ts +1 -3
  41. package/dist/config/project-vite.js +1 -2
  42. package/dist/diff.d.ts +1 -3
  43. package/dist/diff.js +1 -2
  44. package/dist/dom/serialize.js +2 -3
  45. package/dist/errors.d.ts +1 -3
  46. package/dist/errors.js +1 -2
  47. package/dist/harness.d.ts +1 -3
  48. package/dist/harness.js +1 -2
  49. package/dist/index.d.ts +3 -5
  50. package/dist/index.js +1 -2
  51. package/dist/internal.d.ts +3 -3
  52. package/dist/internal.js +2 -2
  53. package/dist/layers.d.ts +1 -3
  54. package/dist/layers.js +1 -2
  55. package/dist/node/browser.d.ts +0 -2
  56. package/dist/node/browser.js +2 -3
  57. package/dist/node/commands.d.ts +2 -4
  58. package/dist/node/commands.js +1 -2
  59. package/dist/node/context.d.ts +1 -3
  60. package/dist/node/context.js +1 -2
  61. package/dist/node/events.d.ts +1 -3
  62. package/dist/node/events.js +1 -2
  63. package/dist/node/finished.d.ts +1 -3
  64. package/dist/node/finished.js +1 -2
  65. package/dist/node/index.d.ts +10 -10
  66. package/dist/node/index.js +11 -11
  67. package/dist/node/matrix.d.ts +2 -4
  68. package/dist/node/matrix.js +1 -2
  69. package/dist/node/mode.d.ts +2 -4
  70. package/dist/node/mode.js +1 -2
  71. package/dist/node/names.d.ts +1 -3
  72. package/dist/node/names.js +1 -2
  73. package/dist/node/policy.d.ts +1 -3
  74. package/dist/node/policy.js +1 -2
  75. package/dist/node/reporter.d.ts +2 -3
  76. package/dist/node/reporter.js +2 -3
  77. package/dist/node/summary.d.ts +2 -4
  78. package/dist/node/summary.js +3 -4
  79. package/dist/node/thrown.js +1 -2
  80. package/dist/node/viewport.d.ts +1 -3
  81. package/dist/node/viewport.js +1 -2
  82. package/dist/node/visual.d.ts +1 -3
  83. package/dist/node/visual.js +2 -3
  84. package/dist/node_modules/.pnpm/playwright-core@1.63.0/node_modules/playwright-core/types/protocol.d.ts +1 -2
  85. package/dist/node_modules/.pnpm/playwright-core@1.63.0/node_modules/playwright-core/types/structs.d.ts +16 -3
  86. package/dist/node_modules/.pnpm/playwright-core@1.63.0/node_modules/playwright-core/types/types.d.ts +16 -2
  87. package/dist/normalize/display.js +1 -2
  88. package/dist/normalize/index.d.ts +1 -3
  89. package/dist/normalize/index.js +2 -3
  90. package/dist/normalize/pipeline.d.ts +1 -3
  91. package/dist/normalize/pipeline.js +2 -3
  92. package/dist/normalize/print.js +1 -2
  93. package/dist/normalize/rules/angular-hosts.js +1 -2
  94. package/dist/normalize/rules/aria-hosts.js +1 -2
  95. package/dist/normalize/rules/comments.js +1 -2
  96. package/dist/normalize/rules/control-values.js +1 -2
  97. package/dist/normalize/rules/engine-aliases.js +1 -2
  98. package/dist/normalize/rules/framework-attributes.js +1 -2
  99. package/dist/normalize/rules/generated-ids.js +1 -2
  100. package/dist/normalize/rules/ordering.js +1 -2
  101. package/dist/normalize/rules/qwik-styles.js +1 -2
  102. package/dist/normalize/rules/qwik-templates.js +1 -2
  103. package/dist/normalize/rules/values.js +1 -2
  104. package/dist/normalize/rules/whitespace.js +2 -3
  105. package/dist/normalize/style.js +1 -2
  106. package/dist/normalize/targets.d.ts +1 -3
  107. package/dist/normalize/targets.js +1 -2
  108. package/dist/normalize/tree.d.ts +1 -1
  109. package/dist/normalize/tree.js +1 -2
  110. package/dist/setup.js +8 -9
  111. package/dist/ssr/index.d.ts +0 -2
  112. package/dist/ssr/index.js +4 -5
  113. package/dist/ssr/spec.js +1 -2
  114. package/dist/targets/angular.js +1 -2
  115. package/dist/targets/astro.js +1 -2
  116. package/dist/targets/qwik.js +1 -2
  117. package/dist/targets/react.js +1 -2
  118. package/dist/targets/solid.js +1 -2
  119. package/dist/targets/svelte.js +1 -2
  120. package/dist/targets/vue.js +1 -2
  121. package/dist/visual-types.d.ts +1 -3
  122. package/dist/visual-types.js +1 -2
  123. package/package.json +14 -14
@@ -1,6 +1,5 @@
1
1
  import { UnframeworkConfig, ViteContext } from "@unframework.dev/compiler";
2
2
  import { ToolchainContext } from "@unframework.dev/codegen";
3
- //#region src/config/project-vite.d.ts
4
3
  /** The project's `vite` function, as `unframework.config.ts` gives it. */
5
4
  export type ProjectVite = UnframeworkConfig["vite"];
6
5
  /** What `ToolchainContext.plugins` takes: a function that makes a fresh set of Vite plugins. */
@@ -36,5 +35,4 @@ export declare const PASS_THROUGH_DECLARATIONS: string;
36
35
  * `dist` alone. It is written only when it differs, through a rename, so runs that share a root
37
36
  * never read half of it.
38
37
  */
39
- export declare function passThroughDeclarations(root: string): string[];
40
- //#endregion
38
+ export declare function passThroughDeclarations(root: string): string[];
@@ -2,7 +2,7 @@ import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
3
  import { DEFAULT_PASS_THROUGH } from "@unframework.dev/compiler";
4
4
  import { mergeConfig } from "vitest/config";
5
- //#region src/config/project-vite.ts
5
+ // src/config/project-vite.ts
6
6
  /**
7
7
  * The keys every server sets for itself, which the project's config may not set: its root, its
8
8
  * caches, its Vitest options, and the preview's refusal to load a Vite config of its own or to
@@ -148,5 +148,4 @@ function passThroughDeclarations(root) {
148
148
  }
149
149
  return [file];
150
150
  }
151
- //#endregion
152
151
  export { OWNED_KEYS, OWNED_SERVER_KEYS, PASS_THROUGH_DECLARATIONS, passThroughDeclarations, projectPlugins, withProjectVite };
package/dist/diff.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/diff.d.ts
2
1
  /** Options for {@link diffLines}. */
3
2
  export interface DiffOptions {
4
3
  /** Unchanged lines shown around each change. */
@@ -10,5 +9,4 @@ export interface DiffOptions {
10
9
  * A unified-style diff from `expected` to `actual`: `-` lines are expected, `+` lines are
11
10
  * actual. Returns an empty string when the texts are equal.
12
11
  */
13
- export declare function diffLines(expected: string, actual: string, options?: DiffOptions): string;
14
- //#endregion
12
+ export declare function diffLines(expected: string, actual: string, options?: DiffOptions): string;
package/dist/diff.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/diff.ts
1
+ // src/diff.ts
2
2
  /** Above this many cells the LCS table is too large; the diff falls back to the first change. */
3
3
  const MAX_CELLS = 4e6;
4
4
  /**
@@ -88,5 +88,4 @@ function firstChange(a, b) {
88
88
  function visible(text) {
89
89
  return text.replace(/\r/g, "\\r").replace(/[ \t]+$/, (spaces) => spaces.replace(/ /g, "·"));
90
90
  }
91
- //#endregion
92
91
  export { diffLines };
@@ -1,7 +1,7 @@
1
- import { attributeName, childrenOf, isElement as isElement$1, isText as isText$1, parseHtml } from "../normalize/tree.js";
2
1
  import { recordComputedLayout } from "../normalize/display.js";
3
2
  import { checkOptions, normalizeTree } from "../normalize/pipeline.js";
4
- //#region src/dom/serialize.ts
3
+ import { attributeName, childrenOf, isElement as isElement$1, isText as isText$1, parseHtml } from "../normalize/tree.js";
4
+ // src/dom/serialize.ts
5
5
  const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
6
6
  const XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/";
7
7
  /** Namespace names for messages. */
@@ -232,5 +232,4 @@ function parsedAttributeKey(attribute) {
232
232
  function qualified(namespace, name) {
233
233
  return namespace ? `{${namespace}}${name}` : name;
234
234
  }
235
- //#endregion
236
235
  export { normalizeDomWithIds, serializeDom };
package/dist/errors.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/errors.d.ts
2
1
  /**
3
2
  * The text of a thrown value, for a layer's failure message. Assertion errors on strings get a
4
3
  * line diff, because the message is all the parity matrix and the combined error keep.
@@ -9,5 +8,4 @@ export declare function formatError(error: unknown): string;
9
8
  * Vitest wraps an error it cannot attribute to a test (a failed import, a closed browser
10
9
  * connection) in its own, so the cause is the part that says what happened.
11
10
  */
12
- export declare function errorMessages(error: unknown): string[];
13
- //#endregion
11
+ export declare function errorMessages(error: unknown): string[];
package/dist/errors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { diffLines } from "./diff.js";
2
- //#region src/errors.ts
2
+ // src/errors.ts
3
3
  /**
4
4
  * The text of a thrown value, for a layer's failure message. Assertion errors on strings get a
5
5
  * line diff, because the message is all the parity matrix and the combined error keep.
@@ -34,5 +34,4 @@ function messageOf(error) {
34
34
  const message = "message" in error ? error.message : void 0;
35
35
  return typeof message === "string" ? message : "an error without a message";
36
36
  }
37
- //#endregion
38
37
  export { errorMessages, formatError };
package/dist/harness.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { QuarantineEntry } from "./layers.js";
2
2
  import { Capabilities } from "@unframework.dev/codegen";
3
- //#region src/harness.d.ts
4
3
  /** An SSR scenario of a case: the props it renders with. */
5
4
  export interface SsrScenario {
6
5
  props?: Record<string, unknown>;
@@ -185,5 +184,4 @@ export declare function isReference(harness: Pick<HarnessContext, "reference" |
185
184
  * The targets that write some case's shared artefacts in place of the run's reference
186
185
  * (ADR-0057): they run after the reference and before every other target (`groupOrder`).
187
186
  */
188
- export declare function caseReferences(harness: Pick<HarnessContext, "reference" | "cases">): string[];
189
- //#endregion
187
+ export declare function caseReferences(harness: Pick<HarnessContext, "reference" | "cases">): string[];
package/dist/harness.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/harness.ts
1
+ // src/harness.ts
2
2
  /** Every {@link ColorScheme}, the first the default. */
3
3
  const COLOR_SCHEMES = ["light", "dark"];
4
4
  /**
@@ -49,5 +49,4 @@ function isReference(harness, target, caseId) {
49
49
  function caseReferences(harness) {
50
50
  return [...new Set(Object.values(harness.cases).flatMap((config) => config.reference && config.reference !== harness.reference ? [config.reference] : []))].sort();
51
51
  }
52
- //#endregion
53
52
  export { BROWSER_ENGINES, COLOR_SCHEMES, caseOfFile, caseReference, caseReferences, isReference, ssrScenarios };
package/dist/index.d.ts CHANGED
@@ -1,16 +1,14 @@
1
- import { CaseConfig, SsrScenario } from "./harness.js";
2
1
  import { ConsoleEntry, allowConsole, capturedConsole } from "./browser/console.js";
3
- import { PixelTolerance } from "./visual-types.js";
4
2
  import { NoAxeViolationsOptions } from "./browser/matchers.js";
5
- import { TraceStep } from "./browser/trace.js";
6
3
  import { ParityOptions } from "./browser/parity.js";
7
4
  import { SpecOptions, SpecTest, it, test } from "./browser/spec.js";
8
5
  import { ViewClock } from "./browser/clock.js";
9
6
  import { currentTarget } from "./browser/target.js";
7
+ import { TraceStep } from "./browser/trace.js";
10
8
  import { ClickOptions, ViewUser } from "./browser/user.js";
11
9
  import { ComponentMountOptions, NotAFunction, Props, View, ViewOptions, mount, mountScenario } from "./browser/view.js";
12
- //#region src/index.d.ts
10
+ import { CaseConfig, SsrScenario } from "./harness.js";
11
+ import { PixelTolerance } from "./visual-types.js";
13
12
  /** `describe()` with the project's target in the title, so reports tell the targets apart. */
14
13
  export declare function describeTargets(name: string, fn: () => void): void;
15
- //#endregion
16
14
  export { type CaseConfig, type ClickOptions, type ComponentMountOptions, type ConsoleEntry, type NoAxeViolationsOptions, type NotAFunction, type ParityOptions, type PixelTolerance, type Props, type SpecOptions, type SpecTest, type SsrScenario, type TraceStep, type View, type ViewClock, type ViewOptions, type ViewUser, allowConsole, capturedConsole, currentTarget, it, mount, mountScenario, test };
package/dist/index.js CHANGED
@@ -3,10 +3,9 @@ import { allowConsole, capturedConsole } from "./browser/console.js";
3
3
  import { it, test } from "./browser/spec.js";
4
4
  import { mount, mountScenario } from "./browser/view.js";
5
5
  import { describe } from "vitest";
6
- //#region src/index.ts
6
+ // src/index.ts
7
7
  /** `describe()` with the project's target in the title, so reports tell the targets apart. */
8
8
  function describeTargets(name, fn) {
9
9
  describe(`${name} [${currentTarget()}]`, fn);
10
10
  }
11
- //#endregion
12
11
  export { allowConsole, capturedConsole, currentTarget, describeTargets, it, mount, mountScenario, test };
@@ -1,8 +1,8 @@
1
- import { LAYERS, LayerCheck, LayerFailure, LayerName, LayerOutcome, LayerSkip, LayerSubject, QuarantineEntry, UfLayerMeta, checkLayers, recordLayer } from "./layers.js";
2
- import { HarnessContext } from "./harness.js";
3
- import { installMatchers } from "./browser/matchers.js";
4
1
  import { TargetOptions, registerTarget } from "./browser/target.js";
5
2
  import { cleanup } from "./browser/view.js";
6
3
  import { CaptureCommand, captureVisual } from "./browser/visual.js";
4
+ import { installMatchers } from "./browser/matchers.js";
5
+ import { HarnessContext } from "./harness.js";
6
+ import { LAYERS, LayerCheck, LayerFailure, LayerName, LayerOutcome, LayerSkip, LayerSubject, QuarantineEntry, UfLayerMeta, checkLayers, recordLayer } from "./layers.js";
7
7
  import { MountAdapter, MountEvent, MountListener, MountOptions, MountedComponent, RenderReport } from "@unframework.dev/codegen";
8
8
  export { type CaptureCommand, type HarnessContext, LAYERS, type LayerCheck, LayerFailure, type LayerName, type LayerOutcome, type LayerSkip, type LayerSubject, type MountAdapter, type MountEvent, type MountListener, type MountOptions, type MountedComponent, type QuarantineEntry, type RenderReport, type TargetOptions, type UfLayerMeta, captureVisual, checkLayers, cleanup, installMatchers, recordLayer, registerTarget };
package/dist/internal.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { registerTarget } from "./browser/target.js";
2
- import { LAYERS, LayerFailure, checkLayers, recordLayer } from "./layers.js";
3
- import { captureVisual } from "./browser/visual.js";
4
2
  import { cleanup } from "./browser/view.js";
3
+ import { captureVisual } from "./browser/visual.js";
5
4
  import { installMatchers } from "./browser/matchers.js";
5
+ import { LAYERS, LayerFailure, checkLayers, recordLayer } from "./layers.js";
6
6
  export { LAYERS, LayerFailure, captureVisual, checkLayers, cleanup, installMatchers, recordLayer, registerTarget };
package/dist/layers.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { PixelMode } from "./harness.js";
2
- //#region src/layers.d.ts
3
2
  /** The verification layers of plan §7.2. */
4
3
  export type LayerName = "L1" | "L2" | "L3" | "L4" | "L5" | "L6" | "L7" | "L8" | "L9" | "L10" | "L11" | "L12" | "L13" | "L14" | "L15";
5
4
  /** Every layer, in order. */
@@ -179,5 +178,4 @@ export declare class LayerFailure extends Error {
179
178
  case: string;
180
179
  target: string;
181
180
  }, failures: readonly string[]);
182
- }
183
- //#endregion
181
+ }
package/dist/layers.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { formatError } from "./errors.js";
2
2
  import { REFERENCE_NOT_RUN_SKIP } from "./visual-types.js";
3
- //#region src/layers.ts
3
+ // src/layers.ts
4
4
  /** Every layer, in order. */
5
5
  const LAYERS = [
6
6
  "L1",
@@ -237,5 +237,4 @@ var LayerFailure = class extends Error {
237
237
  this.failures = failures;
238
238
  }
239
239
  };
240
- //#endregion
241
240
  export { BROWSER_LAYERS, LAYERS, LayerFailure, NOT_IN_THIS_RUN_SKIP, NOT_RENDERED_SKIP, NO_INTERACTION_SKIP, NO_OUTPUT_SKIP, NO_OUTPUT_TEST_SKIP, NO_SPEC_SKIP, REQUIRES_SKIP, checkLayers, layerFailures, mergeOutcomes, noOutputSkip, quarantineFor, recordLayer, recordLayerChecks, recordScenario, recordStandIn, requiresSkip, settleOutcome };
@@ -1,7 +1,6 @@
1
1
  import { BrowserEngine } from "../harness.js";
2
2
  import { VIEWPORT } from "./viewport.js";
3
3
  import { BrowserConfigOptions } from "vitest/node";
4
- //#region src/node/browser.d.ts
5
4
  /**
6
5
  * How long a user's action (`view.user.click`, …) waits for its element, as `expect.element`
7
6
  * waits the poll timeout (ADR-0043): without it the provider waits for the whole test's
@@ -29,5 +28,4 @@ export interface ParityBrowserOptions {
29
28
  * visual comparison for that project without a word.
30
29
  */
31
30
  export declare function parityBrowser(options: ParityBrowserOptions): BrowserConfigOptions;
32
- //#endregion
33
31
  export { VIEWPORT };
@@ -1,7 +1,7 @@
1
- import { VIEWPORT } from "./viewport.js";
2
1
  import { browserCommands } from "./commands.js";
2
+ import { VIEWPORT } from "./viewport.js";
3
3
  import { playwright } from "@vitest/browser-playwright";
4
- //#region src/node/browser.ts
4
+ // src/node/browser.ts
5
5
  /**
6
6
  * How long a user's action (`view.user.click`, …) waits for its element, as `expect.element`
7
7
  * waits the poll timeout (ADR-0043): without it the provider waits for the whole test's
@@ -60,5 +60,4 @@ function parityBrowser(options) {
60
60
  }
61
61
  };
62
62
  }
63
- //#endregion
64
63
  export { ACTION_TIMEOUT, VIEWPORT, parityBrowser };
@@ -1,9 +1,8 @@
1
- import { ColorScheme } from "../harness.js";
2
1
  import { ArtefactRequest, ArtefactResult, ComponentEventsRequest, ComponentEventsResult, InputRequest, InputResult, SerializedLocatorLike } from "../commands.js";
2
+ import { ColorScheme } from "../harness.js";
3
3
  import { CommandProject } from "./context.js";
4
4
  import { ufSpecFinished } from "./finished.js";
5
5
  import { ufVisualCapture } from "./visual.js";
6
- //#region src/node/commands.d.ts
7
6
  /**
8
7
  * `ufArtefact`: settles a shared expectation the browser computed (L7, L9). Contents of `null`
9
8
  * say the scenario has no such file: only a trace may be absent, when no step led to it.
@@ -133,5 +132,4 @@ export declare const browserCommands: {
133
132
  ufColorScheme: typeof ufColorScheme;
134
133
  ufComponentEvents: typeof ufComponentEvents;
135
134
  ufSpecFinished: typeof ufSpecFinished;
136
- };
137
- //#endregion
135
+ };
@@ -7,7 +7,7 @@ import { settleArtefact } from "./policy.js";
7
7
  import { VIEWPORT } from "./viewport.js";
8
8
  import { ufVisualCapture } from "./visual.js";
9
9
  import { join } from "node:path";
10
- //#region src/node/commands.ts
10
+ // src/node/commands.ts
11
11
  /**
12
12
  * The shared expectations the browser may settle: `dom.<name>.html` and `aria.<name>.yaml` (L7)
13
13
  * and `trace.<name>.json` (L9).
@@ -135,5 +135,4 @@ const browserCommands = {
135
135
  ufComponentEvents,
136
136
  ufSpecFinished
137
137
  };
138
- //#endregion
139
138
  export { browserCommands, ufAriaSnapshot, ufArtefact, ufColorScheme, ufComponentEvents, ufFocus, ufInput, ufResetInput };
@@ -1,6 +1,5 @@
1
1
  import { HarnessContext } from "../harness.js";
2
2
  import { ArtefactContext } from "./policy.js";
3
- //#region src/node/context.d.ts
4
3
  /** The part of Vitest's `BrowserCommandContext` the commands read. */
5
4
  export interface CommandProject {
6
5
  project: {
@@ -24,5 +23,4 @@ export declare function displayRoot(harness: HarnessContext): string;
24
23
  * How a target settles a case's artefacts every target shares (`__expected__/*`): the case's
25
24
  * reference (ADR-0057) writes them in update mode, everyone else compares.
26
25
  */
27
- export declare function sharedArtefactContext(harness: HarnessContext, target: string, caseId: string): ArtefactContext;
28
- //#endregion
26
+ export declare function sharedArtefactContext(harness: HarnessContext, target: string, caseId: string): ArtefactContext;
@@ -1,7 +1,7 @@
1
1
  import { caseReference, isReference } from "../harness.js";
2
2
  import { existsSync, readdirSync } from "node:fs";
3
3
  import { dirname, join, resolve } from "node:path";
4
- //#region src/node/context.ts
4
+ // src/node/context.ts
5
5
  /** The calling project's target and harness context; throws if the project does not provide them. */
6
6
  function projectHarness(context) {
7
7
  const provided = context.project.getProvidedContext();
@@ -51,5 +51,4 @@ function sharedArtefactContext(harness, target, caseId) {
51
51
  reference: caseReference(harness, caseId)
52
52
  };
53
53
  }
54
- //#endregion
55
54
  export { caseDirectory, caseMainSource, displayRoot, projectHarness, sharedArtefactContext };
@@ -1,6 +1,5 @@
1
1
  import { UfModule } from "@unframework.dev/ir";
2
2
  import { MountEvent } from "@unframework.dev/codegen";
3
- //#region src/node/events.d.ts
4
3
  /** A module a project compiled, as the unplugin's `onCompile` reports it. */
5
4
  export interface CompiledModule {
6
5
  /** The authored `.uf.tsx` file, absolute. */
@@ -21,5 +20,4 @@ export declare function recordCompiledModule(module: CompiledModule): void;
21
20
  */
22
21
  export declare function compiledEvents(file: string, target: string): MountEvent[];
23
22
  /** The events a module's component declares (see {@link compiledEvents}). */
24
- export declare function eventsOfModule(ir: UfModule, file?: string): MountEvent[];
25
- //#endregion
23
+ export declare function eventsOfModule(ir: UfModule, file?: string): MountEvent[];
@@ -1,5 +1,5 @@
1
1
  import { realpathSync } from "node:fs";
2
- //#region src/node/events.ts
2
+ // src/node/events.ts
3
3
  /**
4
4
  * One store per process, whatever copy of this module records or reads it: the config that
5
5
  * builds the projects and the commands it registers may load it apart.
@@ -46,5 +46,4 @@ function eventsOfModule(ir, file = ir.file) {
46
46
  if (rest.some((list) => JSON.stringify(list) !== JSON.stringify(first))) throw new Error(`[uf] ${file} holds ${lists.length} components that declare different events, and a case mounts one of them: a test cannot tell which one it mounts until components can be composed (M3).`);
47
47
  return first;
48
48
  }
49
- //#endregion
50
49
  export { compiledEvents, eventsOfModule, recordCompiledModule };
@@ -1,6 +1,5 @@
1
1
  import { SpecFinishedRequest } from "../commands.js";
2
2
  import { CommandProject } from "./context.js";
3
- //#region src/node/finished.d.ts
4
3
  /**
5
4
  * `ufSpecFinished`: records that the calling project finished a case's spec file. The setup
6
5
  * file calls it from an `aroundAll` hook after the file's tests and its afterAll hooks, so it
@@ -8,5 +7,4 @@ import { CommandProject } from "./context.js";
8
7
  */
9
8
  export declare function ufSpecFinished(context: CommandProject, request: SpecFinishedRequest): void;
10
9
  /** Whether a target's browser project finished a case's spec file in a run. */
11
- export declare function specFinished(runId: string, target: string, caseId: string): boolean;
12
- //#endregion
10
+ export declare function specFinished(runId: string, target: string, caseId: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { caseDirectory, projectHarness } from "./context.js";
2
- //#region src/node/finished.ts
2
+ // src/node/finished.ts
3
3
  const STATE = Symbol.for("unframework.visual.finished");
4
4
  /** Run id and target → the cases whose spec file that target's browser project finished. */
5
5
  function finished() {
@@ -24,5 +24,4 @@ function ufSpecFinished(context, request) {
24
24
  function specFinished(runId, target, caseId) {
25
25
  return finished().get(keyOf(runId, target))?.has(caseId) ?? false;
26
26
  }
27
- //#endregion
28
27
  export { specFinished, ufSpecFinished };
@@ -1,21 +1,21 @@
1
- import { BROWSER_LAYERS, LAYERS, LayerCheck, LayerFailure, LayerName, LayerOutcome, LayerSkip, LayerSubject, LayerTask, NOT_IN_THIS_RUN_SKIP, NOT_RENDERED_SKIP, NO_INTERACTION_SKIP, NO_OUTPUT_SKIP, NO_OUTPUT_TEST_SKIP, NO_SPEC_SKIP, QuarantineEntry, REQUIRES_SKIP, UfLayerMeta, checkLayers, layerFailures, mergeOutcomes, noOutputSkip, quarantineFor, recordLayer, recordStandIn, requiresSkip, settleOutcome } from "../layers.js";
2
- import { BROWSER_ENGINES, BrowserEngine, COLOR_SCHEMES, CaseConfig, ColorScheme, HarnessContext, PixelMode, SsrScenario, caseOfFile, caseReference, caseReferences, isReference, ssrScenarios } from "../harness.js";
3
- import { formatConsoleArgs } from "../browser/console.js";
4
- import { CaptureAttachment, CaptureOutcome, CaptureRequest, CaptureResult, FONT_AUDIT_SKIP, GeometryDelta, GeometrySnapshot, LIVE_REFERENCE_SKIP, PixelTolerance, REFERENCE_NOT_RUN_SKIP, referenceNotRunSkip } from "../visual-types.js";
5
- import { MapStackRequest, MapStackResult, SpecFinishedRequest } from "../commands.js";
6
- import { VIEWPORT } from "./viewport.js";
7
1
  import { ACTION_TIMEOUT, AnyBrowserCommand, ParityBrowserOptions, parityBrowser } from "./browser.js";
8
- import { ArtefactContext, ArtefactOutcome, ArtefactRole, ArtefactStatus, settleArtefact, settleArtefactDirectory, writeIfChanged } from "./policy.js";
9
- import { CommandProject, caseDirectory, displayRoot, projectHarness, sharedArtefactContext } from "./context.js";
10
- import { specFinished, ufSpecFinished } from "./finished.js";
11
- import { ALLOWED_FONTS, CaptureLocation, VisualCommandContext, baselineFileName, captureAt, caseCaptureLocation, diffGeometry, formatGeometryDiff, ufVisualCapture } from "./visual.js";
12
2
  import { AriaCommandContext, ColorSchemeContext, FocusCommandContext, InputCommandContext, browserCommands, ufAriaSnapshot, ufArtefact, ufColorScheme, ufComponentEvents, ufFocus, ufResetInput } from "./commands.js";
3
+ import { MapStackRequest, MapStackResult, SpecFinishedRequest } from "../commands.js";
13
4
  import { CompiledModule, compiledEvents, eventsOfModule, recordCompiledModule } from "./events.js";
5
+ import { specFinished, ufSpecFinished } from "./finished.js";
6
+ import { VIEWPORT } from "./viewport.js";
7
+ import { CommandProject, caseDirectory, displayRoot, projectHarness, sharedArtefactContext } from "./context.js";
14
8
  import { MATRIX_VERSION, MatrixCells, MatrixTest, MatrixTests, MergedMatrix, ParityMatrix, PartialMatrix, ProjectRecord, RunInfo, RunMode, Shard, buildCells, buildPartialMatrix, buildTests, cellHeadline, cellOf, mergeCells, mergeMatrices, mergeTests, narrowing, outcomeOfCell, settleQuarantine, stringifyMatrix, withoutProjects } from "./matrix.js";
15
9
  import { BASELINE_ENVIRONMENT, HarnessMode, HarnessRunOptions, ModeInput, ProjectKind, createHarnessRun, groupOrder, resolveBrowser, resolveHarnessMode } from "./mode.js";
16
10
  import { KEBAB_CASE } from "./names.js";
11
+ import { ArtefactContext, ArtefactOutcome, ArtefactRole, ArtefactStatus, settleArtefact, settleArtefactDirectory, writeIfChanged } from "./policy.js";
17
12
  import { ParityReporter, ParityReporterOptions, isPartialMatrixFile, readPartialMatrices, runName, testKey } from "./reporter.js";
18
13
  import { SummaryExpectations, SummaryJudgement, SummaryOptions, SummaryResult, renderMarkdown, summarise, summaryName, unacceptedSkip, writeSummary } from "./summary.js";
14
+ import { ALLOWED_FONTS, CaptureLocation, VisualCommandContext, baselineFileName, captureAt, caseCaptureLocation, diffGeometry, formatGeometryDiff, ufVisualCapture } from "./visual.js";
15
+ import { formatConsoleArgs } from "../browser/console.js";
19
16
  import { DiffOptions, diffLines } from "../diff.js";
20
17
  import { errorMessages, formatError } from "../errors.js";
18
+ import { BROWSER_ENGINES, BrowserEngine, COLOR_SCHEMES, CaseConfig, ColorScheme, HarnessContext, PixelMode, SsrScenario, caseOfFile, caseReference, caseReferences, isReference, ssrScenarios } from "../harness.js";
19
+ import { BROWSER_LAYERS, LAYERS, LayerCheck, LayerFailure, LayerName, LayerOutcome, LayerSkip, LayerSubject, LayerTask, NOT_IN_THIS_RUN_SKIP, NOT_RENDERED_SKIP, NO_INTERACTION_SKIP, NO_OUTPUT_SKIP, NO_OUTPUT_TEST_SKIP, NO_SPEC_SKIP, QuarantineEntry, REQUIRES_SKIP, UfLayerMeta, checkLayers, layerFailures, mergeOutcomes, noOutputSkip, quarantineFor, recordLayer, recordStandIn, requiresSkip, settleOutcome } from "../layers.js";
20
+ import { CaptureAttachment, CaptureOutcome, CaptureRequest, CaptureResult, FONT_AUDIT_SKIP, GeometryDelta, GeometrySnapshot, LIVE_REFERENCE_SKIP, PixelTolerance, REFERENCE_NOT_RUN_SKIP, referenceNotRunSkip } from "../visual-types.js";
21
21
  export { ACTION_TIMEOUT, ALLOWED_FONTS, type AnyBrowserCommand, type AriaCommandContext, type ArtefactContext, type ArtefactOutcome, type ArtefactRole, type ArtefactStatus, BASELINE_ENVIRONMENT, BROWSER_ENGINES, BROWSER_LAYERS, type BrowserEngine, COLOR_SCHEMES, type CaptureAttachment, type CaptureLocation, type CaptureOutcome, type CaptureRequest, type CaptureResult, type CaseConfig, type ColorScheme, type ColorSchemeContext, type CommandProject, type CompiledModule, type DiffOptions, FONT_AUDIT_SKIP, type FocusCommandContext, type GeometryDelta, type GeometrySnapshot, type HarnessContext, type HarnessMode, type HarnessRunOptions, type InputCommandContext, KEBAB_CASE, LAYERS, LIVE_REFERENCE_SKIP, type LayerCheck, LayerFailure, type LayerName, type LayerOutcome, type LayerSkip, type LayerSubject, type LayerTask, MATRIX_VERSION, type MapStackRequest, type MapStackResult, type MatrixCells, type MatrixTest, type MatrixTests, type MergedMatrix, type ModeInput, NOT_IN_THIS_RUN_SKIP, NOT_RENDERED_SKIP, NO_INTERACTION_SKIP, NO_OUTPUT_SKIP, NO_OUTPUT_TEST_SKIP, NO_SPEC_SKIP, type ParityBrowserOptions, type ParityMatrix, ParityReporter, type ParityReporterOptions, type PartialMatrix, type PixelMode, type PixelTolerance, type ProjectKind, type ProjectRecord, type QuarantineEntry, REFERENCE_NOT_RUN_SKIP, REQUIRES_SKIP, type RunInfo, type RunMode, type Shard, type SpecFinishedRequest, type SsrScenario, type SummaryExpectations, type SummaryJudgement, type SummaryOptions, type SummaryResult, type UfLayerMeta, VIEWPORT, type VisualCommandContext, baselineFileName, browserCommands, buildCells, buildPartialMatrix, buildTests, captureAt, caseCaptureLocation, caseDirectory, caseOfFile, caseReference, caseReferences, cellHeadline, cellOf, checkLayers, compiledEvents, createHarnessRun, diffGeometry, diffLines, displayRoot, errorMessages, eventsOfModule, formatConsoleArgs, formatError, formatGeometryDiff, groupOrder, isPartialMatrixFile, isReference, layerFailures, mergeCells, mergeMatrices, mergeOutcomes, mergeTests, narrowing, noOutputSkip, outcomeOfCell, parityBrowser, projectHarness, quarantineFor, readPartialMatrices, recordCompiledModule, recordLayer, recordStandIn, referenceNotRunSkip, renderMarkdown, requiresSkip, resolveBrowser, resolveHarnessMode, runName, settleArtefact, settleArtefactDirectory, settleOutcome, settleQuarantine, sharedArtefactContext, specFinished, ssrScenarios, stringifyMatrix, summarise, summaryName, testKey, ufAriaSnapshot, ufArtefact, ufColorScheme, ufComponentEvents, ufFocus, ufResetInput, ufSpecFinished, ufVisualCapture, unacceptedSkip, withoutProjects, writeIfChanged, writeSummary };
@@ -1,20 +1,20 @@
1
- import { BROWSER_ENGINES, COLOR_SCHEMES, caseOfFile, caseReference, caseReferences, isReference, ssrScenarios } from "../harness.js";
2
- import { caseDirectory, displayRoot, projectHarness, sharedArtefactContext } from "./context.js";
1
+ import { ACTION_TIMEOUT, parityBrowser } from "./browser.js";
2
+ import { browserCommands, ufAriaSnapshot, ufArtefact, ufColorScheme, ufComponentEvents, ufFocus, ufResetInput } from "./commands.js";
3
3
  import { compiledEvents, eventsOfModule, recordCompiledModule } from "./events.js";
4
4
  import { specFinished, ufSpecFinished } from "./finished.js";
5
+ import { caseDirectory, displayRoot, projectHarness, sharedArtefactContext } from "./context.js";
6
+ import { MATRIX_VERSION, buildCells, buildPartialMatrix, buildTests, cellHeadline, cellOf, mergeCells, mergeMatrices, mergeTests, narrowing, outcomeOfCell, settleQuarantine, stringifyMatrix, withoutProjects } from "./matrix.js";
7
+ import { BASELINE_ENVIRONMENT, createHarnessRun, groupOrder, resolveBrowser, resolveHarnessMode } from "./mode.js";
8
+ import { VIEWPORT } from "./viewport.js";
5
9
  import { KEBAB_CASE } from "./names.js";
6
- import { diffLines } from "../diff.js";
7
10
  import { settleArtefact, settleArtefactDirectory, writeIfChanged } from "./policy.js";
8
- import { VIEWPORT } from "./viewport.js";
9
- import { BASELINE_ENVIRONMENT, createHarnessRun, groupOrder, resolveBrowser, resolveHarnessMode } from "./mode.js";
11
+ import { ParityReporter, isPartialMatrixFile, readPartialMatrices, runName, testKey } from "./reporter.js";
12
+ import { renderMarkdown, summarise, summaryName, unacceptedSkip, writeSummary } from "./summary.js";
10
13
  import { ALLOWED_FONTS, baselineFileName, captureAt, caseCaptureLocation, diffGeometry, formatGeometryDiff, ufVisualCapture } from "./visual.js";
11
- import { browserCommands, ufAriaSnapshot, ufArtefact, ufColorScheme, ufComponentEvents, ufFocus, ufResetInput } from "./commands.js";
12
- import { ACTION_TIMEOUT, parityBrowser } from "./browser.js";
13
14
  import { formatConsoleArgs } from "../browser/console.js";
15
+ import { diffLines } from "../diff.js";
14
16
  import { errorMessages, formatError } from "../errors.js";
15
- import { FONT_AUDIT_SKIP, LIVE_REFERENCE_SKIP, REFERENCE_NOT_RUN_SKIP, referenceNotRunSkip } from "../visual-types.js";
17
+ import { BROWSER_ENGINES, COLOR_SCHEMES, caseOfFile, caseReference, caseReferences, isReference, ssrScenarios } from "../harness.js";
16
18
  import { BROWSER_LAYERS, LAYERS, LayerFailure, NOT_IN_THIS_RUN_SKIP, NOT_RENDERED_SKIP, NO_INTERACTION_SKIP, NO_OUTPUT_SKIP, NO_OUTPUT_TEST_SKIP, NO_SPEC_SKIP, REQUIRES_SKIP, checkLayers, layerFailures, mergeOutcomes, noOutputSkip, quarantineFor, recordLayer, recordStandIn, requiresSkip, settleOutcome } from "../layers.js";
17
- import { MATRIX_VERSION, buildCells, buildPartialMatrix, buildTests, cellHeadline, cellOf, mergeCells, mergeMatrices, mergeTests, narrowing, outcomeOfCell, settleQuarantine, stringifyMatrix, withoutProjects } from "./matrix.js";
18
- import { ParityReporter, isPartialMatrixFile, readPartialMatrices, runName, testKey } from "./reporter.js";
19
- import { renderMarkdown, summarise, summaryName, unacceptedSkip, writeSummary } from "./summary.js";
19
+ import { FONT_AUDIT_SKIP, LIVE_REFERENCE_SKIP, REFERENCE_NOT_RUN_SKIP, referenceNotRunSkip } from "../visual-types.js";
20
20
  export { ACTION_TIMEOUT, ALLOWED_FONTS, BASELINE_ENVIRONMENT, BROWSER_ENGINES, BROWSER_LAYERS, COLOR_SCHEMES, FONT_AUDIT_SKIP, KEBAB_CASE, LAYERS, LIVE_REFERENCE_SKIP, LayerFailure, MATRIX_VERSION, NOT_IN_THIS_RUN_SKIP, NOT_RENDERED_SKIP, NO_INTERACTION_SKIP, NO_OUTPUT_SKIP, NO_OUTPUT_TEST_SKIP, NO_SPEC_SKIP, ParityReporter, REFERENCE_NOT_RUN_SKIP, REQUIRES_SKIP, VIEWPORT, baselineFileName, browserCommands, buildCells, buildPartialMatrix, buildTests, captureAt, caseCaptureLocation, caseDirectory, caseOfFile, caseReference, caseReferences, cellHeadline, cellOf, checkLayers, compiledEvents, createHarnessRun, diffGeometry, diffLines, displayRoot, errorMessages, eventsOfModule, formatConsoleArgs, formatError, formatGeometryDiff, groupOrder, isPartialMatrixFile, isReference, layerFailures, mergeCells, mergeMatrices, mergeOutcomes, mergeTests, narrowing, noOutputSkip, outcomeOfCell, parityBrowser, projectHarness, quarantineFor, readPartialMatrices, recordCompiledModule, recordLayer, recordStandIn, referenceNotRunSkip, renderMarkdown, requiresSkip, resolveBrowser, resolveHarnessMode, runName, settleArtefact, settleArtefactDirectory, settleOutcome, settleQuarantine, sharedArtefactContext, specFinished, ssrScenarios, stringifyMatrix, summarise, summaryName, testKey, ufAriaSnapshot, ufArtefact, ufColorScheme, ufComponentEvents, ufFocus, ufResetInput, ufSpecFinished, ufVisualCapture, unacceptedSkip, withoutProjects, writeIfChanged, writeSummary };
@@ -1,6 +1,5 @@
1
- import { LayerName, LayerOutcome, QuarantineEntry, UfLayerMeta } from "../layers.js";
2
1
  import { PixelMode } from "../harness.js";
3
- //#region src/node/matrix.d.ts
2
+ import { LayerName, LayerOutcome, QuarantineEntry, UfLayerMeta } from "../layers.js";
4
3
  /** Case → target → layer → cell. */
5
4
  export type MatrixCells = Record<string, Record<string, Partial<Record<LayerName, string>>>>;
6
5
  /** Case → target → the parity scenarios its tests checked (`expectParity` names), sorted. */
@@ -215,5 +214,4 @@ export declare function settleQuarantine(cells: MatrixCells, quarantine: readonl
215
214
  stale: boolean;
216
215
  }): string[];
217
216
  /** Serialises a matrix with a trailing newline; equal matrices are equal bytes. */
218
- export declare function stringifyMatrix(matrix: ParityMatrix): string;
219
- //#endregion
217
+ export declare function stringifyMatrix(matrix: ParityMatrix): string;
@@ -1,5 +1,5 @@
1
1
  import { LAYERS, mergeOutcomes, quarantineFor, settleOutcome } from "../layers.js";
2
- //#region src/node/matrix.ts
2
+ // src/node/matrix.ts
3
3
  /** The version of the matrix files; a file of another version is never merged. */
4
4
  const MATRIX_VERSION = 5;
5
5
  /** Why a run covered only part of its projects' tests, its shard included, or `null`. */
@@ -305,5 +305,4 @@ function settleQuarantine(cells, quarantine, options) {
305
305
  function stringifyMatrix(matrix) {
306
306
  return `${JSON.stringify(matrix, null, 2)}\n`;
307
307
  }
308
- //#endregion
309
308
  export { MATRIX_VERSION, buildCells, buildPartialMatrix, buildScenarios, buildTests, cellHeadline, cellOf, mergeCells, mergeMatrices, mergeScenarios, mergeTests, narrowing, outcomeOfCell, settleQuarantine, stringifyMatrix, withoutProjects };
@@ -1,6 +1,5 @@
1
- import { QuarantineEntry } from "../layers.js";
2
1
  import { BrowserEngine, CaseConfig, HarnessContext, PixelMode } from "../harness.js";
3
- //#region src/node/mode.d.ts
2
+ import { QuarantineEntry } from "../layers.js";
4
3
  /**
5
4
  * The image and platform the committed Linux baselines (`*-chromium-linux.png`, geometry) come
6
5
  * from: CI's browser jobs run in it, and `pnpm test:baselines` exports it as
@@ -99,5 +98,4 @@ export interface HarnessRunOptions {
99
98
  * id; the first call removes the directories of runs that have ended, and never those of a run
100
99
  * still going in another process (`pnpm test:canaries` next to `pnpm test`).
101
100
  */
102
- export declare function createHarnessRun(options: HarnessRunOptions): HarnessContext;
103
- //#endregion
101
+ export declare function createHarnessRun(options: HarnessRunOptions): HarnessContext;
package/dist/node/mode.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BROWSER_ENGINES } from "../harness.js";
2
2
  import { existsSync, readdirSync, rmSync } from "node:fs";
3
3
  import { join } from "node:path";
4
- //#region src/node/mode.ts
4
+ // src/node/mode.ts
5
5
  /**
6
6
  * The image and platform the committed Linux baselines (`*-chromium-linux.png`, geometry) come
7
7
  * from: CI's browser jobs run in it, and `pnpm test:baselines` exports it as
@@ -200,5 +200,4 @@ function isRunning(pid) {
200
200
  return error.code === "EPERM";
201
201
  }
202
202
  }
203
- //#endregion
204
203
  export { BASELINE_ENVIRONMENT, createHarnessRun, groupOrder, isCI, resolveBrowser, resolveHarnessMode };
@@ -1,4 +1,2 @@
1
- //#region src/node/names.d.ts
2
1
  /** Lower-case letters and digits in words joined by single hyphens, such as `after-click`. */
3
- export declare const KEBAB_CASE: RegExp;
4
- //#endregion
2
+ export declare const KEBAB_CASE: RegExp;
@@ -1,5 +1,4 @@
1
- //#region src/node/names.ts
1
+ // src/node/names.ts
2
2
  /** Lower-case letters and digits in words joined by single hyphens, such as `after-click`. */
3
3
  const KEBAB_CASE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
4
- //#endregion
5
4
  export { KEBAB_CASE };
@@ -1,4 +1,3 @@
1
- //#region src/node/policy.d.ts
2
1
  /** Who may write an artefact. */
3
2
  export type ArtefactRole = "owner" | "reference" | "follower";
4
3
  /** How an artefact was settled. */
@@ -40,5 +39,4 @@ export declare function settleArtefactDirectory(directory: string, files: Readon
40
39
  root: string;
41
40
  }): ArtefactOutcome;
42
41
  /** Writes a file only when its contents change, so update runs leave mtimes alone. */
43
- export declare function writeIfChanged(path: string, contents: string | Uint8Array): boolean;
44
- //#endregion
42
+ export declare function writeIfChanged(path: string, contents: string | Uint8Array): boolean;
@@ -1,7 +1,7 @@
1
1
  import { diffLines } from "../diff.js";
2
2
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, rmdirSync, statSync, writeFileSync } from "node:fs";
3
3
  import { dirname, isAbsolute, join, relative, sep } from "node:path";
4
- //#region src/node/policy.ts
4
+ // src/node/policy.ts
5
5
  /** The corpus's command that writes the artefacts. */
6
6
  const CORPUS_UPDATE = "pnpm test:update";
7
7
  const updateHint = (command = CORPUS_UPDATE) => `Run \`${command}\` and review the diff if the change is intended.`;
@@ -136,5 +136,4 @@ function removeEmptyDirectories(directory) {
136
136
  function display(path, root) {
137
137
  return relative(root, path).split(sep).join("/");
138
138
  }
139
- //#endregion
140
139
  export { settleArtefact, settleArtefactDirectory, writeIfChanged };
@@ -1,7 +1,6 @@
1
- import { UfLayerMeta } from "../layers.js";
2
1
  import { HarnessContext } from "../harness.js";
2
+ import { UfLayerMeta } from "../layers.js";
3
3
  import { PartialMatrix } from "./matrix.js";
4
- //#region src/node/reporter.d.ts
5
4
  /** The part of a Vitest test case the reporter reads. */
6
5
  interface ReportedTest {
7
6
  project: {
@@ -98,4 +97,4 @@ export declare function runName(projects: readonly string[], allProjects?: reado
98
97
  export declare function isPartialMatrixFile(name: string): boolean;
99
98
  /** The partial matrices in a directory, by file. Throws on one that is not a current matrix. */
100
99
  export declare function readPartialMatrices(reportsDir: string): Map<string, PartialMatrix>;
101
- //#endregion
100
+ export {};
@@ -1,9 +1,9 @@
1
- import { BROWSER_ENGINES, caseOfFile } from "../harness.js";
2
1
  import { errorMessages } from "../errors.js";
2
+ import { BROWSER_ENGINES, caseOfFile } from "../harness.js";
3
3
  import { buildPartialMatrix, narrowing, settleQuarantine, stringifyMatrix, withoutProjects } from "./matrix.js";
4
4
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
5
5
  import { join, resolve } from "node:path";
6
- //#region src/node/reporter.ts
6
+ // src/node/reporter.ts
7
7
  /** The parity reporter. Add it to `test.reporters` next to Vitest's own. */
8
8
  var ParityReporter = class {
9
9
  #options;
@@ -247,5 +247,4 @@ function supersede(reportsDir, written, projects, scopes) {
247
247
  }
248
248
  return done;
249
249
  }
250
- //#endregion
251
250
  export { ParityReporter, isPartialMatrixFile, readPartialMatrices, runName, testKey };
@@ -1,7 +1,6 @@
1
- import { LayerName } from "../layers.js";
2
1
  import { BrowserEngine } from "../harness.js";
2
+ import { LayerName } from "../layers.js";
3
3
  import { MergedMatrix, PartialMatrix } from "./matrix.js";
4
- //#region src/node/summary.d.ts
5
4
  /** What a complete run covers. */
6
5
  export interface SummaryExpectations {
7
6
  /** Every project the config defines (for the selected targets). */
@@ -95,5 +94,4 @@ export declare function renderMarkdown(matrix: MergedMatrix, expected: SummaryEx
95
94
  quarantined: number;
96
95
  /** The engine the browser projects ran in, when it is not Chromium. */
97
96
  browser?: BrowserEngine | undefined;
98
- }): string;
99
- //#endregion
97
+ }): string;