Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Add unit test for install build pipeline (#40)
Browse files Browse the repository at this point in the history
* Add unit test for install build pipeline

* Remove unused import

* Remove test spy

Co-authored-by: Edaena Salinas <edaena@Edaenas-MBP.hsd1.ca.comcast.net>
  • Loading branch information
edaena and Edaena Salinas authored May 7, 2020
1 parent 3989c3a commit 7bb9d5e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/commands/service/pipeline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ describe("test execute function", () => {
await execute("serviceName", tmpDir, mockedVals, exitFn);
expect(exitFn).toBeCalledTimes(1);
});
it("negative test: service is not defined", async () => {
const exitFn = jest.fn();

await execute("myServiceName", tmpDir, getMockedValues(), exitFn);
expect(exitFn).toBeCalledTimes(1);
expect(exitFn.mock.calls).toEqual([[1]]);
});
});

describe("required pipeline variables", () => {
Expand Down

0 comments on commit 7bb9d5e

Please sign in to comment.