Skip to content

Commit 1df1c9f

Browse files
committed
Include expected suffixes in test
1 parent 9483bd5 commit 1df1c9f

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/debug-artifacts.test.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,22 @@ test("getArtifactSuffix", (t) => {
3636

3737
// Suffixes for non-empty, valid `matrix` inputs.
3838
const testMatrices = [
39-
{ language: "go" },
40-
{ language: "javascript", "build-mode": "none" },
39+
{ matrix: { language: "go" }, expected: "-go" },
40+
{
41+
matrix: { language: "javascript", "build-mode": "none" },
42+
expected: "-none-javascript",
43+
},
44+
{
45+
matrix: { "build-mode": "none", language: "javascript" },
46+
expected: "-none-javascript",
47+
},
4148
];
4249

4350
for (const testMatrix of testMatrices) {
44-
const suffix = debugArtifacts.getArtifactSuffix(JSON.stringify(testMatrix));
45-
t.not(suffix, "");
46-
47-
for (const key of Object.keys(testMatrix)) {
48-
t.assert(suffix.includes(testMatrix[key] as string));
49-
}
51+
const suffix = debugArtifacts.getArtifactSuffix(
52+
JSON.stringify(testMatrix.matrix),
53+
);
54+
t.is(suffix, testMatrix.expected);
5055
}
5156
});
5257

0 commit comments

Comments
 (0)