@jwilger/pi-development-system 0.10.2 → 0.10.3
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/package.json
CHANGED
package/src/core/test-paths.ts
CHANGED
|
@@ -14,6 +14,8 @@ const PATTERNS: readonly RegExp[] = [
|
|
|
14
14
|
/_test\.(go|rb|py|exs?|rs)$/,
|
|
15
15
|
/(^|\/)test_[^/]+\.py$/,
|
|
16
16
|
/_spec\.rb$/,
|
|
17
|
+
/(^|\/)tests?\.rs$/,
|
|
18
|
+
/_tests\.rs$/,
|
|
17
19
|
];
|
|
18
20
|
|
|
19
21
|
/** Glob match without building a RegExp: `**` spans directories, `*` stays within a segment. */
|
package/src/core/test-runner.ts
CHANGED
|
@@ -27,6 +27,8 @@ function isRunner(words: readonly string[]): boolean {
|
|
|
27
27
|
if (head === undefined) return false;
|
|
28
28
|
const args = rest.filter((w) => !w.startsWith("+"));
|
|
29
29
|
const first = args[0];
|
|
30
|
+
// Compile-only and listing runs prove nothing about RED/GREEN, so they must not overwrite a real result.
|
|
31
|
+
if (rest.some((w) => /^--(?:no-run|list|help)$/.test(w) || w === "-h")) return false;
|
|
30
32
|
if (head === "cargo") return first === "test" || first === "nextest";
|
|
31
33
|
if (head === "go" || head === "deno") return first === "test";
|
|
32
34
|
if (head === "node") return rest.includes("--test");
|
|
@@ -59,7 +61,7 @@ export type ResultLike = {
|
|
|
59
61
|
/** A pipe or sequence makes the shell report the last command's status, not the runner's. */
|
|
60
62
|
const MASKS_STATUS = /\||;/;
|
|
61
63
|
const FAILURE_MARKERS =
|
|
62
|
-
|
|
64
|
+
/^(?:# |ℹ )fail [1-9]|test result: FAILED|\b[1-9]\d* (?:failed|failing)\b|^FAILED\b|^FAIL\b|\bnot ok\b/m;
|
|
63
65
|
|
|
64
66
|
const isRecord = (v: unknown): v is Record<string, unknown> =>
|
|
65
67
|
typeof v === "object" && v !== null && !Array.isArray(v);
|