fix(ci): handle line breaks in documentation paths
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
This commit is contained in:
parent
eeafead333
commit
b6cba39c6b
|
|
@ -176,7 +176,7 @@ if (tier === "reused") {
|
|||
) {
|
||||
selected.docs = true;
|
||||
// Authored documentation code also belongs to the static checkers.
|
||||
selected.code ||= /^docs\/.*\.(?:[cm]?[jt]s|[jt]sx)$/u.test(file);
|
||||
selected.code ||= /^docs\/.*\.(?:[cm]?[jt]s|[jt]sx)$/su.test(file);
|
||||
selected.website ||= matchesAny(file, SCOPES.website);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,17 @@ it("retains code checks when documentation code is removed or renamed to Markdow
|
|||
});
|
||||
});
|
||||
|
||||
it("selects code checks for documentation filenames containing line breaks", async () => {
|
||||
const { directory, base } = await fixture();
|
||||
const head = await change(directory, ["docs/.vitepress/navigation\nmenu.ts"]);
|
||||
expect(await classify(directory, base, head)).toMatchObject({
|
||||
code: true,
|
||||
docs: true,
|
||||
runtime: false,
|
||||
package: false,
|
||||
});
|
||||
});
|
||||
|
||||
it.each([
|
||||
"job-timings.mjs",
|
||||
"job-timings-batch.mjs",
|
||||
|
|
|
|||
Loading…
Reference in New Issue