Merge pull request #3898 from mastertyko/fix/3897-verification-not-applicable-emdash
fix(gsd): accept em-dash none verification rationale
This commit is contained in:
commit
f6a7c3138f
2 changed files with 12 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ export function incrementUatCount(basePath: string, mid: string, sid: string): n
|
|||
export function isVerificationNotApplicable(value: string): boolean {
|
||||
const v = (value ?? "").toLowerCase().trim().replace(/[.\s]+$/, "");
|
||||
if (!v || v === "none") return true;
|
||||
return /^(?:none[\s._-]*(?:required|needed|planned)?|n\/?a|not[\s._-]+(?:applicable|required|needed|provided)|no[\s._-]+operational[\s\S]*)$/i.test(v);
|
||||
return /^(?:none(?:[\s._\u2014-]+[\s\S]*)?|n\/?a|not[\s._-]+(?:applicable|required|needed|provided)|no[\s._-]+operational[\s\S]*)$/i.test(v);
|
||||
}
|
||||
|
||||
// ─── Rules ────────────────────────────────────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -32,6 +32,17 @@ test("isVerificationNotApplicable: 'None planned' is not applicable", () => {
|
|||
assert.equal(isVerificationNotApplicable("None planned"), true);
|
||||
});
|
||||
|
||||
test("isVerificationNotApplicable: 'None — <rationale>' is not applicable (#3897)", () => {
|
||||
assert.equal(
|
||||
isVerificationNotApplicable("None — no new background jobs, workers, or lifecycle changes introduced."),
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
test("isVerificationNotApplicable: em dash without spaces is not applicable (#3897)", () => {
|
||||
assert.equal(isVerificationNotApplicable("none—inline"), true);
|
||||
});
|
||||
|
||||
test("isVerificationNotApplicable: 'N/A' is not applicable", () => {
|
||||
assert.equal(isVerificationNotApplicable("N/A"), true);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue