@jterrazz/test 14.3.0 → 15.1.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/dist/match.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { basename, dirname, resolve } from "node:path";
2
- //#region src/core/specification/shared/ground.ts
2
+ //#region src/specification/facets/_common/ground.ts
3
3
  /**
4
4
  * The GROUND a row of specs stands on — the naming law of a spec tree.
5
5
  *
@@ -35,7 +35,7 @@ const GROUND_DIRS = [
35
35
  GROUND_SEEDS
36
36
  ];
37
37
  //#endregion
38
- //#region src/core/specification/shared/fixtures.ts
38
+ //#region src/specification/facets/_common/fixtures.ts
39
39
  /**
40
40
  * Fixture path resolution + copy semantics for the `cli` facet's `.fixture()`.
41
41
  *
@@ -77,9 +77,9 @@ function discoverSpecsRoot(startDir) {
77
77
  * {@link copyPlan} — it is irrelevant to source resolution.
78
78
  */
79
79
  function resolveFixtureSource(path, testDir) {
80
- const clean = path.replace(/\/+$/, "");
80
+ const clean = path.replace(/\/+$/u, "");
81
81
  if (clean === "$FIXTURES" || path.startsWith("$FIXTURES/")) {
82
- const rest = clean.slice(9).replace(/^\/+/, "");
82
+ const rest = clean.slice(9).replace(/^\/+/u, "");
83
83
  return resolve(discoverSpecsRoot(testDir), GROUND_FIXTURES, rest);
84
84
  }
85
85
  if (path.startsWith("$")) {
@@ -102,12 +102,12 @@ function resolveFixtureSource(path, testDir) {
102
102
  function copyPlan(path, testDir, workDir) {
103
103
  const src = resolveFixtureSource(path, testDir);
104
104
  return {
105
- dest: /\/+$/.test(path) ? workDir : resolve(workDir, basename(src)),
105
+ dest: /\/+$/u.test(path) ? workDir : resolve(workDir, basename(src)),
106
106
  src
107
107
  };
108
108
  }
109
109
  //#endregion
110
- //#region src/core/matching/match.ts
110
+ //#region src/specification/matching/match.ts
111
111
  /** Every kind usable as a `{{token}}` in fixture files (all but ref/regex/includes). */
112
112
  const TOKEN_KINDS = [
113
113
  "any",
@@ -167,16 +167,6 @@ var Matcher = class {
167
167
  }
168
168
  };
169
169
  const typed = (kind) => () => new Matcher(kind);
170
- /**
171
- * Dynamic-value matchers for structural comparisons — the code-side mirror of
172
- * the `{{token}}` fixture grammar (CONVENTIONS D4).
173
- *
174
- * @example
175
- * await expect(result.table('users', { database: 'db' })).toMatchRows({
176
- * columns: ['id', 'name'],
177
- * rows: [[match.uuid(), 'Alice']],
178
- * });
179
- */
180
170
  const match = {
181
171
  /** Matches anything. */
182
172
  any: typed("any"),