From 86d99811f207320af28fd7b71f6a5217661da2d9 Mon Sep 17 00:00:00 2001 From: Kyle Watson Date: Thu, 16 Nov 2023 11:40:18 +0100 Subject: [PATCH] test(backstage-plugin): Fix linting test files Move test setup files out of source folder to avoid needing dependencies instead of dev dependencies when compiling typescript. Addresses #71 --- backstage-plugin/plugins/open-dora/package.json | 2 +- backstage-plugin/plugins/open-dora/src/setupTests.ts | 2 +- .../plugins/open-dora/{src => testing}/jest.polyfills.js | 0 .../plugins/open-dora/{src => testing}/mswHandlers.ts | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename backstage-plugin/plugins/open-dora/{src => testing}/jest.polyfills.js (100%) rename backstage-plugin/plugins/open-dora/{src => testing}/mswHandlers.ts (100%) diff --git a/backstage-plugin/plugins/open-dora/package.json b/backstage-plugin/plugins/open-dora/package.json index 7e3944f..62af6b0 100644 --- a/backstage-plugin/plugins/open-dora/package.json +++ b/backstage-plugin/plugins/open-dora/package.json @@ -72,7 +72,7 @@ ] }, "setupFiles": [ - "./jest.polyfills.js" + "../testing/jest.polyfills.js" ] } } diff --git a/backstage-plugin/plugins/open-dora/src/setupTests.ts b/backstage-plugin/plugins/open-dora/src/setupTests.ts index 2ac8f20..a7211d8 100644 --- a/backstage-plugin/plugins/open-dora/src/setupTests.ts +++ b/backstage-plugin/plugins/open-dora/src/setupTests.ts @@ -1,7 +1,7 @@ import '@testing-library/jest-dom'; import 'cross-fetch/polyfill'; import { setupServer } from 'msw/node'; -import { handlers } from './mswHandlers'; +import { handlers } from '../testing/mswHandlers'; export const server = setupServer(...handlers); diff --git a/backstage-plugin/plugins/open-dora/src/jest.polyfills.js b/backstage-plugin/plugins/open-dora/testing/jest.polyfills.js similarity index 100% rename from backstage-plugin/plugins/open-dora/src/jest.polyfills.js rename to backstage-plugin/plugins/open-dora/testing/jest.polyfills.js diff --git a/backstage-plugin/plugins/open-dora/src/mswHandlers.ts b/backstage-plugin/plugins/open-dora/testing/mswHandlers.ts similarity index 100% rename from backstage-plugin/plugins/open-dora/src/mswHandlers.ts rename to backstage-plugin/plugins/open-dora/testing/mswHandlers.ts