MCPcopy Create free account
hub / github.com/Snapchat/Valdi / constructor

Method constructor

valdi/vscode_debugger/src/test/test.ts:342–375  ·  view source on GitHub ↗
(goldenText: GoldenText, private _testTitlePath: string)

Source from the content-addressed store, hash-verified

340 public readonly logger: ILogger;
341
342 constructor(goldenText: GoldenText, private _testTitlePath: string) {
343 this._args = ['--headless'];
344 this.log = goldenText.log.bind(goldenText);
345 this.assertLog = goldenText.assertLog.bind(goldenText);
346 this._workspaceRoot = utils.platformPathToPreferredCase(
347 path.join(__dirname, '..', '..', '..', 'testWorkspace'),
348 );
349 this._webRoot = path.join(this._workspaceRoot, 'web');
350
351 const storagePath = path.join(__dirname, '..', '..');
352 const services = createTopLevelSessionContainer(
353 createGlobalContainer({ storagePath, isVsCode: true }),
354 );
355
356 this.logger = services.get(ILogger);
357 this._root = new Session(this.logger);
358 this._root.adapterConnection.dap().then(dap => {
359 dap.on('initialize', async () => {
360 dap.initialized({});
361 return DebugAdapter.capabilities();
362 });
363 dap.on('configurationDone', async () => {
364 return {};
365 });
366 });
367
368 this.binder = new Binder(this, this._root.adapterConnection, services, new TargetOrigin('0'));
369
370 this.initialize = this._root._init();
371
372 this._launchCallback = () => {};
373 this._workerCallback = () => {};
374 this._worker = new Promise(f => (this._workerCallback = f));
375 }
376
377 public async acquireDap(target: ITarget): Promise<DapConnection> {
378 const p = target.type() === 'page' ? new TestP(this, target) : new NodeTestHandle(this, target);

Callers

nothing calls this directly

Calls 11

createGlobalContainerFunction · 0.90
dapMethod · 0.80
bindMethod · 0.65
getMethod · 0.65
thenMethod · 0.65
onMethod · 0.65
initializedMethod · 0.65
capabilitiesMethod · 0.65
_initMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected