1 parent 5827d20 commit 7585f3cCopy full SHA for 7585f3c
1 file changed
tests/unit/check-gate.test.ts
@@ -43,4 +43,16 @@ describe("check gate", () => {
43
expect(ci).not.toMatch(/^\s*run: bun test(\s|$)/m);
44
expect(ci).not.toMatch(/^\s*run: bun run test(\s|$)/m);
45
});
46
+
47
+ test("CI test shards cover exactly the suite's paths", () => {
48
+ // Sharding must never silently drop part of the suite: the union of the
49
+ // matrix shards has to equal the unsharded `test` script's paths.
50
+ const shardPaths = [...ci.matchAll(/^\s+paths: (.+)$/gm)]
51
+ .flatMap((match) => match[1]?.trim().split(/\s+/) ?? [])
52
+ .sort();
53
+ const suitePaths = TEST_SUITE.split(" ")
54
+ .filter((part) => part.startsWith("./"))
55
56
+ expect(shardPaths).toEqual(suitePaths);
57
+ });
58
0 commit comments