chore: migrate three packages to MSW v2

Migrates test files in config-loader, events-node and kubernetes-react
packages from MSW 1.x to MSW 2.x API to fix compatibility issues with
Jest 30 and JSDOM v26.

Changes:
- Updated msw dependency from ^1.0.0 to ^2.0.0
- Changed imports from `rest` to `http` and `HttpResponse`
- Converted handler syntax from `res(ctx.*)` to `HttpResponse.*`
- Changed `toStrictEqual` to `toEqual` for response assertions

Affected packages:
- @backstage/config-loader
- @backstage/plugin-events-node
- @backstage/plugin-kubernetes-react

Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
Johan Persson
2025-12-02 15:52:05 +01:00
parent cd0b8a11a3
commit e70ff47db3
8 changed files with 182 additions and 214 deletions
+1 -1
View File
@@ -57,7 +57,7 @@
"@backstage/cli": "workspace:^",
"@types/json-schema-merge-allof": "^0.6.0",
"@types/minimist": "^1.2.5",
"msw": "^1.0.0",
"msw": "^2.0.0",
"zen-observable": "^0.10.0"
}
}