From 45949e7684ba0d0b7a6444fa480bdc9737945431 Mon Sep 17 00:00:00 2001 From: Tom Ratcliffe Date: Mon, 15 Apr 2024 16:41:52 +0100 Subject: [PATCH] Simplify import logic for test utils --- jest.config.js | 3 +-- tsconfig.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/jest.config.js b/jest.config.js index 9c991a446fc..4ed043f73de 100644 --- a/jest.config.js +++ b/jest.config.js @@ -31,7 +31,7 @@ module.exports = { transformIgnorePatterns: [ `/node_modules/(?!${esModules})`, // exclude es modules to prevent TS complaining ], - moduleDirectories: ['public', 'node_modules', 'public/test'], + moduleDirectories: ['public', 'node_modules'], roots: ['/public/app', '/public/test', '/packages', '/scripts/tests'], testRegex: '(\\.|/)(test)\\.(jsx?|tsx?)$', moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], @@ -54,7 +54,6 @@ module.exports = { '^@grafana/schema/dist/esm/(.*)$': '/packages/grafana-schema/src/$1', // prevent systemjs amd extra from breaking tests. 'systemjs/dist/extras/amd': '/public/test/mocks/systemjsAMDExtra.ts', - '@grafana/test-utils': '/public/test/test-utils.tsx', }, // Log the test results with dynamic Loki tags. Drone CI only reporters: ['default', ['/public/test/log-reporter.js', { enable: process.env.DRONE === 'true' }]], diff --git a/tsconfig.json b/tsconfig.json index 788431077ee..40bee96229b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,8 +11,7 @@ "incremental": true, "tsBuildInfoFile": "./tsconfig.tsbuildinfo", "paths": { - "@grafana/schema/dist/esm/*": ["../packages/grafana-schema/src/*"], - "@grafana/test-utils": ["./test/test-utils.tsx"] + "@grafana/schema/dist/esm/*": ["../packages/grafana-schema/src/*"] } }, "extends": "@grafana/tsconfig/base.json",