From ff58813a13314562448c5bce7438ef38ed61a891 Mon Sep 17 00:00:00 2001 From: Xavier Foucrier Date: Wed, 15 Mar 2023 14:03:23 +0100 Subject: [PATCH] test(css): :white_check_mark: fix @barba/css tests --- packages/css/__tests__/css.hooks.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/css/__tests__/css.hooks.test.ts b/packages/css/__tests__/css.hooks.test.ts index bf69883f..4cfddaa5 100644 --- a/packages/css/__tests__/css.hooks.test.ts +++ b/packages/css/__tests__/css.hooks.test.ts @@ -50,17 +50,17 @@ it('do leave hooks', async () => { }); it('do enter hooks on first load', async () => { + // Remove from history to simulate first page load. + barba.history.remove(); + await barba.hooks.do('beforeEnter', data, t); await barba.hooks.do('afterEnter', data, t); - expect(css.start).not.toHaveBeenCalled(); - expect(css.end).not.toHaveBeenCalled(); + expect(css.start).toHaveBeenCalledWith(next, 'enter'); + expect(css.end).toHaveBeenCalledWith(next, 'enter'); }); it('do enter hooks', async () => { - // Remove from history to simulate first page load. - barba.history.remove(); - await barba.hooks.do('beforeEnter', data, t); await barba.hooks.do('afterEnter', data, t);