Commit 11d71fd
authored
fix: update telemetry test mocks for @vscode/extension-telemetry v1.5.2
The dependabot PR bumped @vscode/extension-telemetry from ^0.8.4 to
^1.5.2. The old version (0.8.4) exported TelemetryReporter as a default
export (exports.default), while the new version (1.5.2) exports it as a
named export (exports.TelemetryReporter).
The production code in telemetry/index.ts was correctly updated to use
the named export (.TelemetryReporter), but the test mocks still used
{ default: Reporter } causing "TypeError: Reporter is not a constructor"
in 5 unit tests.
Updated all rewiremock calls from:
rewiremock('@vscode/extension-telemetry').with({ default: Reporter })
to:
rewiremock('@vscode/extension-telemetry').with({ TelemetryReporter: Reporter })1 parent e5dc5aa commit 11d71fd
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments