Frontend: Decouple unit tests for decoupled plugins from core (#107942)
* test(frontend): ignore azuremonitor tests in root jest config * test(loki): increase waitfor in monacofieldwrapper test * feat(plugin-configs): introduce jest config * feat(azuremonitor): add jest config and test scripts * ci(pr-frontend-unit-tests): introduce separate decoupled plugin test job * ci(pr-frontend-unit-tests): run decoupled-plugin tests regardless of fork * Wip * test(decoupled-plugins): decouple tests in all plugins except loki and mssql * test(frontend): ignore decoupled plugins that run their own tests * test(stackdriver): update snapshot due to reactinlinesvg mock difference * chore(yarn): update lock file * chore(plugin-configs): remove create-plugin comments * ci(frontend-unit-tests): make them run on pr or merge to main * chore(decoupled-plugins): add plugin:test:ci command for locally running all tests * ci(frontend-unit-tests): run test:ci instead of calling nx directly * chore(decoupled-plugins): fix jest-dom types for loki and testdata
This commit is contained in:
@@ -74,4 +74,19 @@ module.exports = {
|
||||
// Log the test results with dynamic Loki tags. Drone CI only
|
||||
reporters: ['default', ['<rootDir>/public/test/log-reporter.js', { enable: process.env.DRONE === 'true' }]],
|
||||
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
|
||||
testPathIgnorePatterns: [
|
||||
'/node_modules/',
|
||||
// Decoupled plugins run their own tests so ignoring them here.
|
||||
'<rootDir>/public/app/plugins/datasource/azuremonitor',
|
||||
'<rootDir>/public/app/plugins/datasource/cloud-monitoring',
|
||||
'<rootDir>/public/app/plugins/datasource/grafana-postgresql-datasource',
|
||||
'<rootDir>/public/app/plugins/datasource/grafana-pyroscope-datasource',
|
||||
'<rootDir>/public/app/plugins/datasource/grafana-testdata-datasource',
|
||||
'<rootDir>/public/app/plugins/datasource/jaeger',
|
||||
'<rootDir>/public/app/plugins/datasource/mysql',
|
||||
'<rootDir>/public/app/plugins/datasource/parca',
|
||||
'<rootDir>/public/app/plugins/datasource/tempo',
|
||||
'<rootDir>/public/app/plugins/datasource/zipkin',
|
||||
],
|
||||
projects: ['<rootDir>'],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user