Skip to content

Commit

Permalink
chore(#429): add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Feb 3, 2022
1 parent d597857 commit 5fd6e11
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/blocks/test/components/DruxtBlock.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})

0 comments on commit 5fd6e11

Please sign in to comment.