Skip to content

Commit 0792fc5

Browse files
committed
test: cover quoted job names and quotes in descriptions
The widened anchor newly matches quoted keys, which neither master nor the original anchor did.
1 parent cc2010f commit 0792fc5

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

tests/test-cases/comment-directive-anchor/.gitlab-ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ build/image:
2121
script:
2222
- echo "build"
2323

24+
# @Description Quoted with a colon: and "quotes"
25+
"quoted job":
26+
script:
27+
- echo "quoted"
28+
29+
# @Description Single quoted job
30+
'single quoted':
31+
script:
32+
- echo "single"
33+
2434
# @Description Runs the tests
2535
plainjob:
2636
script:

tests/test-cases/comment-directive-anchor/integration.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,7 @@ test.concurrent("comment-directive-anchor --list", async () => {
2626
expect(descriptionOf("sourcemaps")).toBe("Upload source maps. Opt in per brand:");
2727
expect(descriptionOf("deploy to prod")).toBe("Deploys everything");
2828
expect(descriptionOf("build/image")).toBe("Builds the image");
29+
expect(descriptionOf("quoted job")).toBe("Quoted with a colon: and \"quotes\"");
30+
expect(descriptionOf("single quoted")).toBe("Single quoted job");
2931
expect(descriptionOf("plainjob")).toBe("Runs the tests");
3032
});

0 commit comments

Comments
 (0)