mirror of
https://github.com/grafana/grafana.git
synced 2024-12-25 08:21:46 -06:00
Simplify import logic for test utils
This commit is contained in:
parent
488c5b8396
commit
45949e7684
@ -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: ['<rootDir>/public/app', '<rootDir>/public/test', '<rootDir>/packages', '<rootDir>/scripts/tests'],
|
||||
testRegex: '(\\.|/)(test)\\.(jsx?|tsx?)$',
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
||||
@ -54,7 +54,6 @@ module.exports = {
|
||||
'^@grafana/schema/dist/esm/(.*)$': '<rootDir>/packages/grafana-schema/src/$1',
|
||||
// prevent systemjs amd extra from breaking tests.
|
||||
'systemjs/dist/extras/amd': '<rootDir>/public/test/mocks/systemjsAMDExtra.ts',
|
||||
'@grafana/test-utils': '<rootDir>/public/test/test-utils.tsx',
|
||||
},
|
||||
// Log the test results with dynamic Loki tags. Drone CI only
|
||||
reporters: ['default', ['<rootDir>/public/test/log-reporter.js', { enable: process.env.DRONE === 'true' }]],
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user