]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
test: add assertion
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 24 Nov 2020 09:12:51 +0000 (10:12 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 24 Nov 2020 09:12:51 +0000 (10:12 +0100)
__tests__/guards/onBeforeRouteLeave.spec.ts

index 139cf5eaf0ee42d4fc6e932ddcdd30a6070989f8..7fd60c632c140e0e51a8dc600b9bec09f9e2ef39 100644 (file)
@@ -42,6 +42,7 @@ describe('onBeforeRouteLeave', () => {
     await router.isReady()
     await router.push('/leave')
     await router.push('/')
+    expect(spy).toHaveBeenCalledTimes(1)
     await router.push('/leave')
     await router.push('/')
     expect(spy).toHaveBeenCalledTimes(2)