@molecule/api-ai-tools 1.9.5 → 1.9.6
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/suite-overlap.d.ts.map +1 -1
- package/dist/suite-overlap.js +9 -38
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suite-overlap.d.ts","sourceRoot":"","sources":["../src/suite-overlap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAQH;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoB1D;AAKD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAc1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,QAAQ,GAAE,SAAS,MAAM,EAAO,EAChC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EACtB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAClB,MAAM,CAqCR;
|
|
1
|
+
{"version":3,"file":"suite-overlap.d.ts","sourceRoot":"","sources":["../src/suite-overlap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAQH;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoB1D;AAKD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAc1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,QAAQ,GAAE,SAAS,MAAM,EAAO,EAChC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EACtB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAClB,MAAM,CAqCR;AAgHD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+FAA+F;IAC/F,SAAS,EAAE,OAAO,CAAA;IAClB,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,gBAAgB,EACzD,SAAS,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EAC7B,QAAQ,EAAE,SAAS,CAAC,EAAE,GACrB,CAAC,GAAG,IAAI,CAMV;AAqDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQvD"}
|
package/dist/suite-overlap.js
CHANGED
|
@@ -262,45 +262,18 @@ function playwrightLocations(locations, command, cwd) {
|
|
|
262
262
|
/** A spec-file argument Playwright accepts as its positional filter — never a flag. */
|
|
263
263
|
const SPEC_FILE_ARGUMENT = /^(?!-)[^\s]*\.(?:spec|test)\.[cm]?[jt]sx?(?::\d+(?::\d+)?)?$/;
|
|
264
264
|
/**
|
|
265
|
-
*
|
|
266
|
-
* `url-navigation.spec.ts:13:7`, and the file is the argument that supersedes.
|
|
265
|
+
* The statement with every bare spec-file argument taken out once the re-run names failure locations.
|
|
267
266
|
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Whether two spellings name the same spec file: equal, or one the absolute (or longer) form of
|
|
276
|
-
* the other. The command and the reporter routinely spell the same file differently — the model
|
|
277
|
-
* names `url-navigation.spec.ts`, the summary prints `specs/e2e/url-navigation.spec.ts:13`, and a
|
|
278
|
-
* hold hands back `/workspace/fixtures/realworld/specs/e2e/url-navigation.spec.ts:13`.
|
|
279
|
-
*
|
|
280
|
-
* @param argument - The spec-file argument as the command wrote it.
|
|
281
|
-
* @param location - The failing location.
|
|
282
|
-
* @returns True when the location is inside that file.
|
|
283
|
-
*/
|
|
284
|
-
function sameSpecFile(argument, location) {
|
|
285
|
-
const a = locationFile(argument)
|
|
286
|
-
.replace(/^['"]|['"]$/g, '')
|
|
287
|
-
.replace(/^\.\//, '');
|
|
288
|
-
const l = locationFile(location)
|
|
289
|
-
.replace(/^['"]|['"]$/g, '')
|
|
290
|
-
.replace(/^\.\//, '');
|
|
291
|
-
return a === l || a.endsWith(`/${l}`) || l.endsWith(`/${a}`);
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* The statement with every spec-file argument its OWN failure locations already name taken out.
|
|
295
|
-
*
|
|
296
|
-
* A `file:line` inside a named file supersedes the whole file, so keeping both runs the file plus
|
|
297
|
-
* the locations — the whole suite again, with the failures duplicated inside it. xr-molecule-flash-m118
|
|
298
|
-
* (+45:24) composed just that: the model's `npx playwright test … url-navigation.spec.ts` was
|
|
299
|
-
* narrowed to the 14 `file:line`s AND the bare file, "~297s" for a file and fourteen duplicates.
|
|
267
|
+
* The re-run is "just these": Playwright matches each positional argument against every collected
|
|
268
|
+
* file's path, so a bare file left beside the `file:line`s re-admits ALL of that file's tests.
|
|
269
|
+
* xr-molecule-flash-m118 (+45:24) kept the one file its 14 failures were in ("~297s" for a file and
|
|
270
|
+
* fourteen duplicates); xr-molecule-flash-m134 (+20:0x) kept all four files of a run whose 8
|
|
271
|
+
* failures sat in two of them — 32 tests, ~3 min, instead of the 8 failures' ~30 s. A file with no
|
|
272
|
+
* failure in it has nothing to re-run, so it goes too.
|
|
300
273
|
*
|
|
301
274
|
* @param statement - The Playwright statement, starting at its own `playwright test`.
|
|
302
275
|
* @param locations - The failing `file:line`s the re-run names.
|
|
303
|
-
* @returns The statement without
|
|
276
|
+
* @returns The statement without its bare spec-file arguments.
|
|
304
277
|
*/
|
|
305
278
|
function dropSupersededSpecFiles(statement, locations) {
|
|
306
279
|
if (locations.length === 0)
|
|
@@ -312,9 +285,7 @@ function dropSupersededSpecFiles(statement, locations) {
|
|
|
312
285
|
const kept = statement
|
|
313
286
|
.slice(head.length)
|
|
314
287
|
.replace(/(^|\s+)([^\s]+)(?=\s|$)/g, (whole, _space, token) => {
|
|
315
|
-
|
|
316
|
-
return whole;
|
|
317
|
-
return locations.every((location) => sameSpecFile(token, location)) ? '' : whole;
|
|
288
|
+
return SPEC_FILE_ARGUMENT.test(token) ? '' : whole;
|
|
318
289
|
});
|
|
319
290
|
return `${head}${kept}`;
|
|
320
291
|
}
|