From 5fd6e11160f8d2b7df647f616e4ef4d191d71c0b Mon Sep 17 00:00:00 2001 From: Stuart Clark Date: Thu, 3 Feb 2022 14:03:05 +1100 Subject: [PATCH] chore(#429): add test coverage --- packages/blocks/test/components/DruxtBlock.test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/blocks/test/components/DruxtBlock.test.js b/packages/blocks/test/components/DruxtBlock.test.js index 28b1ed2ba..60a63520e 100644 --- a/packages/blocks/test/components/DruxtBlock.test.js +++ b/packages/blocks/test/components/DruxtBlock.test.js @@ -146,4 +146,15 @@ describe('Component - DruxtBlock', () => { block: wrapper.vm.block, }) }) + + test('watch - props $fetch', async () => { + const $fetch = jest.fn() + expect($fetch).toHaveBeenCalledTimes(0) + + DruxtBlock.watch.id.call({ $fetch }) + expect($fetch).toHaveBeenCalledTimes(1) + + DruxtBlock.watch.uuid.call({ $fetch }) + expect($fetch).toHaveBeenCalledTimes(2) + }) })