Skip to content

Commit

Permalink
Merge pull request #140 from kondratyev-nv/unittest_debugging
Browse files Browse the repository at this point in the history
Add debug support for unittest
  • Loading branch information
kondratyev-nv authored Apr 12, 2020
2 parents f3a9c63 + 01636ad commit b6f3e83
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@
"@types/chai": "^4.2.11",
"@types/js-base64": "^2.3.1",
"@types/mocha": "^7.0.2",
"@types/node": "^13.9.3",
"@types/node": "^13.11.1",
"@types/tmp": "^0.1.0",
"@types/xml2js": "^0.4.5",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"mocha": "^7.1.1",
"rimraf": "^3.0.2",
"tslint": "^6.1.0",
"tslint": "^6.1.1",
"typescript": "^3.8.3",
"vsce": "^1.74.0",
"vsce": "^1.75.0",
"vscode": "^1.1.36"
},
"main": "out/src/main.js",
Expand Down
10 changes: 8 additions & 2 deletions src/unittest/unittestTestRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ export class UnittestTestRunner implements ITestRunner {
});
}

public async debugConfiguration(): Promise<IDebugConfiguration> {
throw new Error('Unittest debugging is not supported at the time.');
public async debugConfiguration(config: IWorkspaceConfiguration, test: string): Promise<IDebugConfiguration> {
const additionalEnvironment = await EnvironmentVariablesLoader.load(config.envFile(), process.env, this.logger);
return {
module: 'unittest',
cwd: config.getCwd(),
args: [test],
env: additionalEnvironment,
}
}

public async load(config: IWorkspaceConfiguration): Promise<IDiscoveryResult> {
Expand Down

0 comments on commit b6f3e83

Please sign in to comment.