Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
Signed-off-by: Benji Visser <[email protected]>
  • Loading branch information
noqcks committed Dec 8, 2023
1 parent 1b9b72d commit ac759b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/action.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 11 additions & 0 deletions tests/xeol_command.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ac759b0

Please sign in to comment.