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:
Jack Westbrook
2025-07-17 14:47:52 +02:00
committed by GitHub
parent 4b217c601a
commit b95c00a80f
45 changed files with 448 additions and 20 deletions
@@ -10,6 +10,8 @@
"devDependencies": {
"@grafana/tsconfig": "^2.0.0",
"@swc/core": "1.10.12",
"@swc/helpers": "^0.5.0",
"@swc/jest": "^0.2.26",
"@types/eslint": "9.6.1",
"@types/webpack-bundle-analyzer": "^4.7.0",
"copy-webpack-plugin": "12.0.2",
@@ -17,7 +19,10 @@
"eslint-webpack-plugin": "4.2.0",
"fork-ts-checker-webpack-plugin": "9.0.2",
"glob": "11.0.3",
"identity-obj-proxy": "^3.0.0",
"imports-loader": "^5.0.0",
"jest-canvas-mock": "2.5.2",
"jest-environment-jsdom": "29.7.0",
"replace-in-file-webpack-plugin": "1.0.6",
"swc-loader": "0.2.6",
"typescript": "5.8.3",