From 156180ad382668693962d2c5473c2cac91e88edc Mon Sep 17 00:00:00 2001 From: Dariusz Sikorski Date: Sun, 25 Aug 2024 21:07:07 +0200 Subject: [PATCH] update hello world test and snapshot --- tests/unit/views/HelloWorld.test.js | 13 +++---------- .../views/__snapshots__/HelloWorld.test.js.snap | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/unit/views/HelloWorld.test.js b/tests/unit/views/HelloWorld.test.js index 669e3e5..eb0185d 100644 --- a/tests/unit/views/HelloWorld.test.js +++ b/tests/unit/views/HelloWorld.test.js @@ -1,10 +1,6 @@ import testHelpers from '@@/unit/testHelpers.js'; import HelloWorld from '@/views/HelloWorld.vue'; -function normalizeAmp(html) { - return html.replace(/&/g, '&'); -} - describe('HelloWorld.vue', () => { const setupWrapper = async () => { const wrapper = await testHelpers.shallowMount(HelloWorld); @@ -14,9 +10,7 @@ describe('HelloWorld.vue', () => { describe('Desktop', () => { test('Render default contents', async () => { const wrapper = await setupWrapper(); - const normalizedHtml = normalizeAmp(wrapper.html()); - - expect(normalizedHtml).toMatchSnapshot(); + expect(wrapper.html()).toMatchSnapshot(); }); test('App name and message displays correctly', async () => { @@ -57,9 +51,8 @@ describe('HelloWorld.vue', () => { test('Render default contents', async () => { const wrapper = await setupWrapper(); - const normalizedHtml = normalizeAmp(wrapper.html()); - - expect(normalizedHtml).toMatchSnapshot(); + expect(wrapper.html()) + .toMatchSnapshot(); }); test('Message displays correctly', async () => { diff --git a/tests/unit/views/__snapshots__/HelloWorld.test.js.snap b/tests/unit/views/__snapshots__/HelloWorld.test.js.snap index 960ba39..7ec4c80 100644 --- a/tests/unit/views/__snapshots__/HelloWorld.test.js.snap +++ b/tests/unit/views/__snapshots__/HelloWorld.test.js.snap @@ -7,7 +7,7 @@ exports[`HelloWorld.vue > Desktop > Render default contents 1`] = ` Vue logo

Your App Name Here

-

NW.js & Vue Boilerplate

+

NW.js & Vue Boilerplate

This boilerplate uses + + + + + the .