Skip to content

Commit d975b95

Browse files
authored
chore(scorecard): migrate to Jest 30 (#3019)
Install Jest 30 peer dependencies as required by @backstage/cli 0.36.0 and fix test incompatibilities for Jest 30 and JSDOM 27. Signed-off-by: Jon Koops <jonkoops@gmail.com>
1 parent 0b95731 commit d975b95

3 files changed

Lines changed: 1424 additions & 58 deletions

File tree

workspaces/scorecard/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@
5050
"@backstage/e2e-test-utils": "^0.1.2",
5151
"@backstage/repo-tools": "^0.17.0",
5252
"@changesets/cli": "^2.27.1",
53+
"@jest/environment-jsdom-abstract": "^30.3.0",
5354
"@playwright/test": "^1.56.1",
55+
"@types/jest": "^30.0.0",
56+
"@types/jsdom": "^27.0.0",
57+
"jest": "^30.3.0",
58+
"jsdom": "^27.1.0",
5459
"knip": "^5.27.4",
5560
"node-gyp": "^9.0.0",
5661
"prettier": "^2.3.2",

workspaces/scorecard/plugins/scorecard/src/api/ScorecardApiClient.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe('ScorecardApiClient', () => {
188188
});
189189

190190
await expect(client.getAggregatedScorecard('myKpi')).rejects.toThrow(
191-
TypeError,
191+
'Invalid response format from aggregated scorecard API',
192192
);
193193
});
194194

@@ -199,7 +199,7 @@ describe('ScorecardApiClient', () => {
199199
});
200200

201201
await expect(client.getAggregatedScorecard('myKpi')).rejects.toThrow(
202-
TypeError,
202+
'Invalid response format from aggregated scorecard API',
203203
);
204204
});
205205

@@ -290,7 +290,7 @@ describe('ScorecardApiClient', () => {
290290
});
291291

292292
await expect(client.getAggregationMetadata('myKpi')).rejects.toThrow(
293-
TypeError,
293+
'Invalid response format from aggregation metadata API',
294294
);
295295
});
296296

0 commit comments

Comments
 (0)