(goldenText: GoldenText, private _testTitlePath: string)
| 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); |
nothing calls this directly
no test coverage detected