From 17110dfd1a81e7c4f511387ea88f6b9e1485de10 Mon Sep 17 00:00:00 2001 From: alexandrecoin Date: Tue, 23 Feb 2021 15:08:10 +0100 Subject: [PATCH] fix(tests): add async/await for setProps rendering cf https://github.com/vuejs/vue-test-utils/pull/1752 that was added sneakily to 1.1.3 --- tests/components/PixImage.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/components/PixImage.test.js b/tests/components/PixImage.test.js index ce6d0f345..a8cdbb48b 100644 --- a/tests/components/PixImage.test.js +++ b/tests/components/PixImage.test.js @@ -12,7 +12,7 @@ describe('Component: PixImage', () => { }) describe('Computed Property : Image', () => { - it('should return the same image object if there is an alt', () => { + it('should return the same image object if there is an alt', async () => { // Given const imageWithAlt = { alt: 'Alternative Message', @@ -25,13 +25,13 @@ describe('Component: PixImage', () => { } // When - component.setProps({ field: imageWithAlt }) + await component.setProps({ field: imageWithAlt }) // Then expect(component.vm.image).toEqual(imageWithAlt) }) - it('should return the image object with empty alt and role when there is not alt', () => { + it('should return the image object with empty alt and role when there is not alt', async () => { // Given const imageWithoutAlt = { alt: null, @@ -47,7 +47,7 @@ describe('Component: PixImage', () => { expectedImage.role = 'presentation' // When - component.setProps({ field: imageWithoutAlt }) + await component.setProps({ field: imageWithoutAlt }) // Then expect(component.vm.image).toEqual(expectedImage)