(
filename: string,
options: Partial<INodeLaunchConfiguration> = {},
)
| 449 | } |
| 450 | |
| 451 | async runScript( |
| 452 | filename: string, |
| 453 | options: Partial<INodeLaunchConfiguration> = {}, |
| 454 | ): Promise<NodeTestHandle> { |
| 455 | await this.initialize; |
| 456 | this._launchUrl = path.isAbsolute(filename) ? filename : path.join(testFixturesDir, filename); |
| 457 | |
| 458 | const tmpLogPath = getLogFileForTest(this._testTitlePath); |
| 459 | this._root.dap.launch({ |
| 460 | type: DebugType.Node, |
| 461 | request: 'launch', |
| 462 | name: 'Test Case', |
| 463 | cwd: path.dirname(testFixturesDir), |
| 464 | program: this._launchUrl, |
| 465 | rootPath: this._workspaceRoot, |
| 466 | trace: { logFile: tmpLogPath }, |
| 467 | outFiles: [`${this._workspaceRoot}/**/*.js`, '!**/node_modules/**'], |
| 468 | resolveSourceMapLocations: ['**', '!**/node_modules/**'], |
| 469 | __workspaceFolder: this._workspaceRoot, |
| 470 | ...options, |
| 471 | } as INodeLaunchConfiguration); |
| 472 | const result = await new Promise(f => (this._launchCallback = f)); |
| 473 | return result as NodeTestHandle; |
| 474 | } |
| 475 | |
| 476 | /** |
| 477 | * Runs a script in a separate workspace (i.e. a different 'remoteRoot') |
nothing calls this directly
no test coverage detected