From 8a26a582bf01998442d424bc09bf19d3479e3772 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 31 Jan 2022 17:35:24 +0100 Subject: [PATCH] fix tests --- src/playwright/transformPlaywright.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/playwright/transformPlaywright.test.ts b/src/playwright/transformPlaywright.test.ts index 6d65d32b..0d2b671a 100644 --- a/src/playwright/transformPlaywright.test.ts +++ b/src/playwright/transformPlaywright.test.ts @@ -13,10 +13,8 @@ expect.addSnapshotSerializer({ describe('Playwright', () => { beforeEach(() => { - const basePath = '/Users/yannbraga/open-source/test-runner'; - const pathSpy = jest.spyOn(path, 'resolve'); - pathSpy.mockReturnValueOnce(basePath + '/.storybook'); - pathSpy.mockReturnValueOnce(basePath); + const relativeSpy = jest.spyOn(path, 'relative'); + relativeSpy.mockReturnValueOnce('stories/basic/Header.stories.js'); jest.spyOn(coreCommon, 'serverRequire').mockImplementation(() => ({ stories: [ {