From bcd7452e884b59a3b3c285e53d86519e29e8afa2 Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Thu, 15 Aug 2024 14:23:26 +0000 Subject: [PATCH] DSEGOG-341 Fix linting --- .eslintrc.js => .eslintrc.cjs | 0 e2e/mocked/plotting.spec.ts | 4 ++-- src/mocks/handlers.ts | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) rename .eslintrc.js => .eslintrc.cjs (100%) diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 100% rename from .eslintrc.js rename to .eslintrc.cjs diff --git a/e2e/mocked/plotting.spec.ts b/e2e/mocked/plotting.spec.ts index d984501da..4ac4312b7 100644 --- a/e2e/mocked/plotting.spec.ts +++ b/e2e/mocked/plotting.spec.ts @@ -554,8 +554,8 @@ test('user can change the line width of plotted channels', async ({ page }) => { test('user can plot channels on the right y axis', async ({ page }) => { await page.goto('/'); - // MSW wont load immediately here, so wait for it to start - await page.waitForFunction(() => window.msw); + // MSW wont start immediately here, so wait for page to load first + await expect(page.locator('text=Plots')).toBeVisible(); await page.evaluate(async () => { const { msw } = window; diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts index 2c73d9e79..867a01dfb 100644 --- a/src/mocks/handlers.ts +++ b/src/mocks/handlers.ts @@ -289,8 +289,7 @@ export const handlers = [ } ), http.post('/users/preferences', async ({ request }) => { - // Ignoring here as don't have types defined for these endpoints - // @ts-ignore + // @ts-expect-error Ignoring here as don't have types defined for these endpoints preferredColourMap = (await request.json()).value; return HttpResponse.json(preferredColourMap, { status: 200 }); }),