in testSupport/src/debugClient.ts [353:373]
public assertStoppedLocation(reason: string, expected: { path?: string | RegExp, line?: number, column?: number } ) : Promise<DebugProtocol.StackTraceResponse> {
return this.waitForEvent('stopped').then(event => {
assert.equal(event.body.reason, reason);
return this.stackTraceRequest({
threadId: event.body.threadId
});
}).then(response => {
const frame = response.body.stackFrames[0];
if (typeof expected.path === 'string' || expected.path instanceof RegExp) {
this.assertPath(frame.source.path, expected.path, 'stopped location: path mismatch');
}
if (typeof expected.line === 'number') {
assert.equal(frame.line, expected.line, 'stopped location: line mismatch');
}
if (typeof expected.column === 'number') {
assert.equal(frame.column, expected.column, 'stopped location: column mismatch');
}
return response;
});
}