Merge pull request #2477 from Safelite/feature/resolve-jest-issue

Jest issues resolution
This commit is contained in:
scottkiener-at-safelite 2025-05-01 14:27:37 -04:00 committed by GitHub
commit c6651fd690
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();
});