Skip to content

Commit 5200725

Browse files
fix(w3c/headers): don't require crEnd for CRD status (#5126)
1 parent ff4be47 commit 5200725

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/w3c/headers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ export async function run(conf) {
554554
showError(msg, name);
555555
}
556556

557-
if (conf.isCR && !conf.crEnd) {
557+
if (conf.isCR && !conf.isCRDraft && !conf.crEnd) {
558558
const msg = docLink`${"[specStatus]"} is "CR", but no ${"[crEnd]"} is specified in the ${"[respecConfig]"}.`;
559559
showError(msg, name);
560560
}

tests/spec/w3c/headers-spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,17 @@ describe("W3C — Headers", () => {
194194
expect(result2).toBeTruthy();
195195
});
196196

197+
it("does not require crEnd for CRD", async () => {
198+
const ops = makeStandardOps({
199+
specStatus: "CRD",
200+
group: "webapps",
201+
});
202+
const doc = await makeRSDoc(ops);
203+
const errors = headerErrors(doc);
204+
const crEndError = errors.find(e => e.message.includes("crEnd"));
205+
expect(crEndError).toBeUndefined();
206+
});
207+
197208
describe("specStatus - base", () => {
198209
it("doesn't add 'w3c' to header when status is base", async () => {
199210
const ops = makeStandardOps({

0 commit comments

Comments
 (0)