ensure @Input bindings are not undefined before executing trigger logic
This commit is contained in:
parent
4750d1c5ef
commit
d5e35156e0
6 changed files with 64 additions and 53 deletions
|
@ -31,7 +31,7 @@ describe("ManageTriggerComponent", () => {
|
|||
component.trigger = {id: "2cac6317-754e-47d4-88d3-2a50b3f09ee3", service: "github"};
|
||||
});
|
||||
|
||||
describe("ngOnInit", () => {
|
||||
describe("ngOnChanges", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
apiServiceMock.setup(mock => mock.listTriggerBuildSourceNamespaces).is(() => Promise.resolve({}));
|
||||
|
@ -40,7 +40,7 @@ describe("ManageTriggerComponent", () => {
|
|||
});
|
||||
|
||||
it("sets default values for config and selected namespace", () => {
|
||||
component.ngOnInit();
|
||||
component.ngOnChanges({});
|
||||
|
||||
expect(component.config).toEqual({});
|
||||
expect(component.local.selectedNamespace).toBe(null);
|
||||
|
|
Reference in a new issue