unit test fix
This commit is contained in:
parent
48f46d6774
commit
e84eed8394
1 changed files with 3 additions and 3 deletions
|
|
@ -24,19 +24,19 @@ describe("salesforceWebchat.vue", () => {
|
|||
it("calls the correct initialization function based on environment", () => {
|
||||
applicationConfig.CURRENT_ENVIRONMENT = "Prod";
|
||||
let wrapper = shallowMount(salesforceWebchat);
|
||||
mockProd = jest.spyOn(prodHelper, "initializeSalesforceWebchatForProd");
|
||||
const mockProd = jest.spyOn(prodHelper, "initializeSalesforceWebchatForProd");
|
||||
wrapper.vm.initializeSalesforceWebchat();
|
||||
expect(mockProd).toHaveBeenCalled();
|
||||
|
||||
applicationConfig.CURRENT_ENVIRONMENT = "QA";
|
||||
wrapper = shallowMount(salesforceWebchat);
|
||||
mockQa = jest.spyOn(qaHelper, "initializeSalesforceWebchatForQa");
|
||||
const mockQa = jest.spyOn(qaHelper, "initializeSalesforceWebchatForQa");
|
||||
wrapper.vm.initializeSalesforceWebchat();
|
||||
expect(mockQa).toHaveBeenCalled();
|
||||
|
||||
applicationConfig.CURRENT_ENVIRONMENT = "Dev";
|
||||
wrapper = shallowMount(salesforceWebchat);
|
||||
mockDev = jest.spyOn(devHelper, "initializeSalesforceWebchatForDev");
|
||||
const mockDev = jest.spyOn(devHelper, "initializeSalesforceWebchatForDev");
|
||||
wrapper.vm.initializeSalesforceWebchat();
|
||||
expect(mockDev).toHaveBeenCalled();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue