Skip to content

Commit 7f2b946

Browse files
committed
fix(tests): stop leaving artifacts in the working tree
The parallel-matrix test exports tag-*.txt back into its own directory and never removed them, so a run left the tree dirty. Also ignore /.bun/.
1 parent 555cc4a commit 7f2b946

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.idea/
22
/node_modules/
3+
/.bun/
34
/bin/
45
/ppa/
56
/dist/

tests/test-cases/needs-parallel-matrix-artifacts/integration.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
import fs from "fs-extra";
12
import {WriteStreamsMock} from "../../../src/write-streams.js";
23
import {handler} from "../../../src/handler.js";
34
import chalk from "chalk-template";
45

6+
const cwd = "tests/test-cases/needs-parallel-matrix-artifacts";
7+
8+
afterAll(async () => {
9+
await Promise.all(["aws", "gcp"].map(provider => fs.rm(`${cwd}/tag-${provider}.txt`, {force: true})));
10+
});
11+
512
test.concurrent("needs-parallel-matrix-artifacts cascades only the matching producer's artifacts to each consumer permutation", async () => {
613
const writeStreams = new WriteStreamsMock();
714
await handler({
8-
cwd: "tests/test-cases/needs-parallel-matrix-artifacts",
15+
cwd,
916
shellIsolation: true,
1017
stateDir: ".gitlab-ci-local-needs-parallel-matrix-artifacts",
1118
}, writeStreams);

0 commit comments

Comments
 (0)