Skip to content

Commit 97358eb

Browse files
committed
test(plugin-typescript): adjust e2e test
1 parent fa40fe1 commit 97358eb

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

e2e/plugin-typescript-e2e/tests/__snapshots__/typescript-plugin-json-report.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"details": {
3535
"issues": [
3636
{
37-
"message": "TS1136: Property assignment expected.",
3837
"severity": "error",
3938
"source": {
4039
"file": "tmp/e2e/plugin-typescript-e2e/src/1-syntax-errors.ts",
@@ -56,7 +55,6 @@
5655
"details": {
5756
"issues": [
5857
{
59-
"message": "TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.",
6058
"severity": "error",
6159
"source": {
6260
"file": "tmp/e2e/plugin-typescript-e2e/src/2-semantic-errors.ts",
@@ -66,7 +64,6 @@
6664
},
6765
},
6866
{
69-
"message": "TS2322: Type 'null' is not assignable to type 'string'.",
7067
"severity": "error",
7168
"source": {
7269
"file": "tmp/e2e/plugin-typescript-e2e/src/2-semantic-errors.ts",
@@ -88,7 +85,6 @@
8885
"details": {
8986
"issues": [
9087
{
91-
"message": "TS4112: This member cannot have an 'override' modifier because its containing class 'Standalone' does not extend another class.",
9288
"severity": "error",
9389
"source": {
9490
"file": "tmp/e2e/plugin-typescript-e2e/src/4-languale-service.ts",
@@ -121,7 +117,6 @@
121117
"details": {
122118
"issues": [
123119
{
124-
"message": "TS6059: File '/Users/michael_hladky/WebstormProjects/quality-metrics-cli/tmp/e2e/plugin-typescript-e2e/exclude/utils.ts' is not under 'rootDir' 'src'. 'rootDir' is expected to contain all source files.",
125120
"severity": "error",
126121
"source": {
127122
"file": "tmp/e2e/plugin-typescript-e2e/src/6-configuration-errors.ts",
@@ -161,10 +156,10 @@
161156
"value": 0,
162157
},
163158
],
164-
"date": "2025-03-21T14:28:54.857Z",
159+
"date": "2025-03-21T15:11:20.928Z",
165160
"description": "Official Code PushUp Typescript plugin.",
166161
"docsUrl": "https://www.npmjs.com/package/@code-pushup/typescript-plugin/",
167-
"duration": 2251,
162+
"duration": 2173,
168163
"groups": [
169164
{
170165
"description": "Syntax, semantic, and internal compiler errors are critical for identifying and preventing bugs.",

e2e/plugin-typescript-e2e/tests/collect.e2e.test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,17 @@ describe('PLUGIN collect report with typescript-plugin NPM package', () => {
7878
...audit,
7979
details: {
8080
...audit.details,
81-
issues: (audit?.details?.issues ?? []).map(issue => ({
82-
...issue,
83-
source: {
84-
...issue.source,
85-
...(issue?.source?.file
86-
? { file: osAgnosticPath(issue?.source?.file) }
87-
: {}),
88-
},
89-
})),
81+
issues: (audit?.details?.issues ?? []).map(
82+
({ message, ...issue }) => ({
83+
...issue,
84+
source: {
85+
...issue.source,
86+
...(issue?.source?.file
87+
? { file: osAgnosticPath(issue?.source?.file) }
88+
: {}),
89+
},
90+
}),
91+
),
9092
},
9193
})),
9294
})),

0 commit comments

Comments
 (0)