From a575f499be2ab8f557f469801965eb129ca505e1 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 8 Apr 2020 20:45:08 +0200 Subject: [PATCH] test: remove outdated error --- __tests__/errors.spec.ts | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/__tests__/errors.spec.ts b/__tests__/errors.spec.ts index 92e115b2..2d7d3fbd 100644 --- a/__tests__/errors.spec.ts +++ b/__tests__/errors.spec.ts @@ -53,35 +53,4 @@ describe('Errors', () => { expect.objectContaining({ type: ErrorTypes.NAVIGATION_ABORTED }) ) }) - - it('triggers errors caused by new navigations of a next(redirect) triggered by history', async () => { - const { router, history } = createRouter() - await router.push('/p/0') - await router.push('/p/other') - - router.beforeEach((to, from, next) => { - const p = (Number(to.params.p) || 0) + 1 - if (p === 2) next(false) - else next({ name: 'Param', params: { p: '' + p } }) - }) - - history.back() - await tick() - - expect(onError).toHaveBeenCalledTimes(2) - expect(onError).toHaveBeenNthCalledWith( - 1, - expect.objectContaining({ type: ErrorTypes.NAVIGATION_GUARD_REDIRECT }) - ) - expect(onError.mock.calls[0]).toMatchObject([ - { to: { params: { p: '1' } }, from: { fullPath: '/p/0' } }, - ]) - expect(onError).toHaveBeenNthCalledWith( - 2, - expect.objectContaining({ type: ErrorTypes.NAVIGATION_ABORTED }) - ) - expect(onError.mock.calls[1]).toMatchObject([ - { to: { params: { p: '1' } }, from: { params: { p: 'other' } } }, - ]) - }) }) -- 2.47.2