diff --git a/tests/action.test.js b/tests/action.test.js index 3108924..19a6246 100644 --- a/tests/action.test.js +++ b/tests/action.test.js @@ -98,16 +98,6 @@ describe("scan-action", () => { expect(outputs.stdout).toContain("Failed. Xeol found packages that were End-of-Life (EOL)"); }); - it("runs with api-key input", () => { - const outputs = runAction({ - path: "tests/fixtures/npm-project", - "fail-build": "true", - "output-format": "json", - "api-key": "1234567890", - }); - expect(outputs.stdout).toContain("--api-key"); - }); - it("runs with sbom", () => { const outputs = runAction({ sbom: "fixtures/test_sbom.spdx.json", diff --git a/tests/xeol_command.test.js b/tests/xeol_command.test.js index a7a1fc3..0c2179e 100644 --- a/tests/xeol_command.test.js +++ b/tests/xeol_command.test.js @@ -44,6 +44,17 @@ describe("Xeol command", () => { expect(cmd).toBe("xeol -o json asdf"); }); + it("is invoked with api-key", async () => { + let cmd = await mockExec({ + source: "asdf", + failBuild: "false", + outputFormat: "json", + version: "0.6.0", + apiKey: "1234", + }); + expect(cmd).toBe("xeol -o json --api-key 1234 asdf"); + }) + it("is invoked with fail", async () => { let cmd = await mockExec({ source: "asdf",