From 66104b1d9e44b1cf0772a5a075f13550dc3c1374 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Fri, 17 Feb 2023 10:28:21 -0500 Subject: [PATCH] CSR-1012 formatting --- .../service-zip-modal-question.spec.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js index 4f18fd52a..f0c022ba8 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -3,7 +3,7 @@ import serviceZipModalQuestion from "./service-zip-modal-question"; import crypto from "crypto"; global.crypto = crypto; -jest.mock('@/digital-components/textbox-question/textbox-question', () => ({ +jest.mock("@/digital-components/textbox-question/textbox-question", () => ({ getCmsContent: jest.fn((widgetName, cmsFieldName) => { return widgetName[cmsFieldName]; }), @@ -22,20 +22,23 @@ const mockModalCmsContent = { }; const mockTextboxQuestionCmsContent = { - QuestionText: "Sample question text here." + QuestionText: "Sample question text here.", }; const mockMixin = { methods: { getCmsContent: jest.fn((widgetName, cmsFieldName) => { - if (widgetName === linkWidgetName) + if (widgetName === linkWidgetName) { return mockLinkCmsContent[cmsFieldName]; + } - if (widgetName === modalWidgetName) + if (widgetName === modalWidgetName) { return mockModalCmsContent[cmsFieldName]; + } - if (widgetName === textboxQuestionWidgetName) + if (widgetName === textboxQuestionWidgetName) { return mockTextboxQuestionCmsContent[cmsFieldName]; + } return null; }), @@ -51,7 +54,6 @@ const mockMixin = { }; describe("service-zip-modal-question.vue", () => { - it("Should display text from textboxQuestionWidget", async () => { const wrapper = mount(serviceZipModalQuestion, { mixins: [mockMixin], @@ -62,7 +64,9 @@ describe("service-zip-modal-question.vue", () => { }, attachTo: document.body, }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockTextboxQuestionCmsContent["QuestionText"])); + expect(wrapper.html()).toEqual( + expect.stringContaining(mockTextboxQuestionCmsContent["QuestionText"]) + ); }); it("Should display footer text from modalWidget", async () => { @@ -77,5 +81,4 @@ describe("service-zip-modal-question.vue", () => { }); expect(wrapper.html()).toEqual(expect.stringContaining(mockModalCmsContent["FooterText"])); }); - });