From b0075d6fd09d5ff886a993f2097822615c9aee89 Mon Sep 17 00:00:00 2001 From: brydon1 Date: Wed, 12 Jul 2023 14:08:57 -0400 Subject: [PATCH] Fixing test --- .../textarea-question.spec.js | 2 +- .../contact-details/contact-details.spec.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/digital-components/textarea-question/textarea-question.spec.js b/src/digital-components/textarea-question/textarea-question.spec.js index 8e4d93c6..e56412ae 100644 --- a/src/digital-components/textarea-question/textarea-question.spec.js +++ b/src/digital-components/textarea-question/textarea-question.spec.js @@ -69,7 +69,7 @@ describe('textarea-question.vue', () => { }, mixins: [mockMixin] }); - const expected = `0/${maxLength}`; + const expected = `${maxLength}/${maxLength}`; // Act // Assert diff --git a/src/layouts/contact-details/contact-details.spec.js b/src/layouts/contact-details/contact-details.spec.js index 6ca512f8..211ba840 100644 --- a/src/layouts/contact-details/contact-details.spec.js +++ b/src/layouts/contact-details/contact-details.spec.js @@ -210,16 +210,16 @@ describe('contactDetails.vue', () => { contactInfo } }; + const mountOptions = getMountOptions(); + mountOptions.global = { + plugins: [createTestingPinia({ + initialState: { + main: mainInitialState + } + })] + }; - const wrapper = shallowMount(contactDetails, getMountOptions({ - global: { - plugins: [createTestingPinia({ - initialState: { - main: mainInitialState - } - })] - } - })); + const wrapper = shallowMount(contactDetails, mountOptions); // Assert expect(wrapper.vm.firstName).toBe(contactInfo.firstName);