mirror of
https://github.com/grafana/grafana.git
synced 2025-07-25 16:03:49 +08:00
Alias @grafana/test-utils
for easier imports in tests
This commit is contained in:

committed by
Tom Ratcliffe

parent
c0cb36c9d6
commit
9ad87de0b8
@ -31,7 +31,7 @@ module.exports = {
|
||||
transformIgnorePatterns: [
|
||||
`/node_modules/(?!${esModules})`, // exclude es modules to prevent TS complaining
|
||||
],
|
||||
moduleDirectories: ['public', 'node_modules'],
|
||||
moduleDirectories: ['public', 'node_modules', 'public/test'],
|
||||
roots: ['<rootDir>/public/app', '<rootDir>/public/test', '<rootDir>/packages', '<rootDir>/scripts/tests'],
|
||||
testRegex: '(\\.|/)(test)\\.(jsx?|tsx?)$',
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
||||
@ -54,6 +54,7 @@ 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,14 +11,15 @@
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"@grafana/schema/dist/esm/*": ["../packages/grafana-schema/src/*"]
|
||||
"@grafana/schema/dist/esm/*": ["../packages/grafana-schema/src/*"],
|
||||
"@grafana/test-utils": ["./test/test-utils.tsx"]
|
||||
}
|
||||
},
|
||||
"extends": "@grafana/tsconfig/base.json",
|
||||
"include": [
|
||||
"public/app/**/*.ts*",
|
||||
"public/e2e-test/**/*.ts",
|
||||
"public/test/**/*.ts",
|
||||
"public/test/**/*.ts*",
|
||||
"public/vendor/**/*.ts",
|
||||
"packages/grafana-data/typings",
|
||||
"packages/grafana-ui/src/types"
|
||||
|
Reference in New Issue
Block a user