@@ -138,22 +138,23 @@ suite('Telemetry', () => {
138
138
test ( 'Send Error Telemetry with stack trace' , ( ) => {
139
139
rewiremock . enable ( ) ;
140
140
const error = new Error ( 'Boo' ) ;
141
+ const root = EXTENSION_ROOT_DIR . replace ( / \\ / g, '/' ) ;
141
142
error . stack = [
142
143
'Error: Boo' ,
143
- `at Context.test (${ EXTENSION_ROOT_DIR } /src/test/telemetry/index.unit.test.ts:50:23)` ,
144
- `at callFn (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:372:21)` ,
145
- `at Test.Runnable.run (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:364:7)` ,
146
- `at Runner.runTest (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:455:10)` ,
147
- `at ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:573:12` ,
148
- `at next (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:369:14)` ,
149
- `at ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:379:7` ,
150
- `at next (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:303:14)` ,
151
- `at ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:342:7` ,
152
- `at done (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:319:5)` ,
153
- `at callFn (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:395:7)` ,
154
- `at Hook.Runnable.run (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:364:7)` ,
155
- `at next (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:317:10)` ,
156
- `at Immediate.<anonymous> (${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:347:5)` ,
144
+ `at Context.test (${ root } /src/test/telemetry/index.unit.test.ts:50:23)` ,
145
+ `at callFn (${ root } /node_modules/mocha/lib/runnable.js:372:21)` ,
146
+ `at Test.Runnable.run (${ root } /node_modules/mocha/lib/runnable.js:364:7)` ,
147
+ `at Runner.runTest (${ root } /node_modules/mocha/lib/runner.js:455:10)` ,
148
+ `at ${ root } /node_modules/mocha/lib/runner.js:573:12` ,
149
+ `at next (${ root } /node_modules/mocha/lib/runner.js:369:14)` ,
150
+ `at ${ root } /node_modules/mocha/lib/runner.js:379:7` ,
151
+ `at next (${ root } /node_modules/mocha/lib/runner.js:303:14)` ,
152
+ `at ${ root } /node_modules/mocha/lib/runner.js:342:7` ,
153
+ `at done (${ root } /node_modules/mocha/lib/runnable.js:319:5)` ,
154
+ `at callFn (${ root } /node_modules/mocha/lib/runnable.js:395:7)` ,
155
+ `at Hook.Runnable.run (${ root } /node_modules/mocha/lib/runnable.js:364:7)` ,
156
+ `at next (${ root } /node_modules/mocha/lib/runner.js:317:10)` ,
157
+ `at Immediate.<anonymous> (${ root } /node_modules/mocha/lib/runner.js:347:5)` ,
157
158
'at runCallback (timers.js:789:20)' ,
158
159
'at tryOnImmediate (timers.js:751:5)' ,
159
160
'at processImmediate [as _immediateCallback] (timers.js:722:5)'
@@ -181,20 +182,20 @@ suite('Telemetry', () => {
181
182
expect ( Reporter . errorProps ) . to . deep . equal ( [ ] ) ;
182
183
183
184
const expectedStack = [
184
- `at Context.test ${ EXTENSION_ROOT_DIR } /src/test/telemetry/index.unit.test.ts:50:23` ,
185
- `at callFn ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:372:21` ,
186
- `at Test.Runnable.run ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:364:7` ,
187
- `at Runner.runTest ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:455:10` ,
188
- `at ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:573:12` ,
189
- `at next ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:369:14` ,
190
- `at ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:379:7` ,
191
- `at next ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:303:14` ,
192
- `at ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:342:7` ,
193
- `at done ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:319:5` ,
194
- `at callFn ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:395:7` ,
195
- `at Hook.Runnable.run ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runnable.js:364:7` ,
196
- `at next ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:317:10` ,
197
- `at Immediate ${ EXTENSION_ROOT_DIR } /node_modules/mocha/lib/runner.js:347:5` ,
185
+ `at Context.test ${ root } /src/test/telemetry/index.unit.test.ts:50:23` ,
186
+ `at callFn ${ root } /node_modules/mocha/lib/runnable.js:372:21` ,
187
+ `at Test.Runnable.run ${ root } /node_modules/mocha/lib/runnable.js:364:7` ,
188
+ `at Runner.runTest ${ root } /node_modules/mocha/lib/runner.js:455:10` ,
189
+ `at ${ root } /node_modules/mocha/lib/runner.js:573:12` ,
190
+ `at next ${ root } /node_modules/mocha/lib/runner.js:369:14` ,
191
+ `at ${ root } /node_modules/mocha/lib/runner.js:379:7` ,
192
+ `at next ${ root } /node_modules/mocha/lib/runner.js:303:14` ,
193
+ `at ${ root } /node_modules/mocha/lib/runner.js:342:7` ,
194
+ `at done ${ root } /node_modules/mocha/lib/runnable.js:319:5` ,
195
+ `at callFn ${ root } /node_modules/mocha/lib/runnable.js:395:7` ,
196
+ `at Hook.Runnable.run ${ root } /node_modules/mocha/lib/runnable.js:364:7` ,
197
+ `at next ${ root } /node_modules/mocha/lib/runner.js:317:10` ,
198
+ `at Immediate ${ root } /node_modules/mocha/lib/runner.js:347:5` ,
198
199
'at runCallback timers.js:789:20' ,
199
200
'at tryOnImmediate timers.js:751:5' ,
200
201
'at processImmediate [as _immediateCallback] timers.js:722:5'
0 commit comments