From: Eduardo San Martin Morote Date: Tue, 24 Nov 2020 09:12:51 +0000 (+0100) Subject: test: add assertion X-Git-Tag: v4.0.0-rc.6~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f7182e4a3edef90e05beb9a179ef65ea90fb374;p=thirdparty%2Fvuejs%2Frouter.git test: add assertion --- diff --git a/__tests__/guards/onBeforeRouteLeave.spec.ts b/__tests__/guards/onBeforeRouteLeave.spec.ts index 139cf5ea..7fd60c63 100644 --- a/__tests__/guards/onBeforeRouteLeave.spec.ts +++ b/__tests__/guards/onBeforeRouteLeave.spec.ts @@ -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)