@trops/dash-check 0.4.0 → 0.4.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/helpers/plan.js +8 -2
- package/package.json +1 -1
package/helpers/plan.js
CHANGED
|
@@ -64,7 +64,13 @@ function judges(ctx, when) {
|
|
|
64
64
|
return false;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
// Whole words only ("unreadable" and "not ready" aren't admissions), and only in
|
|
68
|
+
// what the plan says it read and why: the acceptance text is the ticket's words.
|
|
69
|
+
const NOT_READ = /\b(?:not read|didn.t read|wasn.t read|unread)\b/i;
|
|
70
|
+
const admitsNotRead = (nd) =>
|
|
71
|
+
[nd.searchedDone, ...(Array.isArray(nd.missing) ? nd.missing : []).flatMap((m) => (m ? [m.read, m.why] : []))].some((t) =>
|
|
72
|
+
NOT_READ.test(String(t || ""))
|
|
73
|
+
);
|
|
68
74
|
|
|
69
75
|
const evidenceForAcceptance = defineHelper({
|
|
70
76
|
id: "plan.evidenceForAcceptance",
|
|
@@ -103,7 +109,7 @@ const evidenceForAcceptance = defineHelper({
|
|
|
103
109
|
`No evidence it is still missing for: ${lacking.join("; ")}. For each, name the file and function you read (read) and why it does not already do it (why).`
|
|
104
110
|
);
|
|
105
111
|
}
|
|
106
|
-
if (
|
|
112
|
+
if (admitsNotRead(nd)) fail(`${key} says some code was not read: read it before planning`);
|
|
107
113
|
note(`${requireSearch ? "Searched for done work, and evidence" : "Evidence"} for ${items.length} ${acceptanceKey} item${items.length === 1 ? "" : "s"}`);
|
|
108
114
|
},
|
|
109
115
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trops/dash-check",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Compose deterministic checks from small, described building blocks: Jest-style files, JSON recipes and helpers. Runs in Dash, in CI and on a laptop.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "trops",
|