added null case for retrieving build message
This commit is contained in:
parent
b4e79206a0
commit
068ac0f19e
2 changed files with 7 additions and 2 deletions
|
@ -37,6 +37,7 @@ describe("BuildServiceImpl", () => {
|
|||
|
||||
beforeEach(() => {
|
||||
buildMessages = [
|
||||
{phase: null, message: ""},
|
||||
{phase: 'cannot_load', message: 'Cannot load build status'},
|
||||
{phase: 'starting', message: 'Starting Dockerfile build'},
|
||||
{phase: 'initializing', message: 'Starting Dockerfile build'},
|
||||
|
@ -69,7 +70,7 @@ describe("BuildServiceImpl", () => {
|
|||
buildServiceImpl.getBuildMessage(phase);
|
||||
fail("Should throw error");
|
||||
} catch (error) {
|
||||
expect(error.message).toEqual("Invalid build phase");
|
||||
expect(error.message).toEqual(`Invalid build phase: ${phase.toString()}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Reference in a new issue