@jterrazz/test 15.0.0 → 15.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.md +1 -1
- package/dist/ambiguity.js +1 -1
- package/dist/appium.adapter.js +33 -24
- package/dist/artifacts.js +503 -525
- package/dist/checker.js +60 -59
- package/dist/index.d.ts +587 -660
- package/dist/index.js +191 -188
- package/dist/match.js +6 -16
- package/dist/oxlint.cjs +538 -525
- package/dist/oxlint.d.cts +7064 -15
- package/dist/oxlint.d.ts +7064 -15
- package/dist/oxlint.js +538 -525
- package/dist/playwright.adapter.js +36 -14
- package/dist/queue.js +27 -28
- package/dist/spec-document.js +19 -25
- package/dist/vitest.d.ts +6 -6
- package/dist/vitest.js +2 -2
- package/package.json +10 -7
package/dist/match.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { basename, dirname, resolve } from "node:path";
|
|
2
|
-
//#region src/
|
|
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/
|
|
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:
|
|
105
|
+
dest: /\/+$/u.test(path) ? workDir : resolve(workDir, basename(src)),
|
|
106
106
|
src
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
//#endregion
|
|
110
|
-
//#region src/
|
|
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"),
|