diff --git a/src/testCommands.ts b/src/testCommands.ts index cbbbaf6..5d1026a 100644 --- a/src/testCommands.ts +++ b/src/testCommands.ts @@ -273,7 +273,7 @@ export class TestCommands implements Disposable { return new Promise((resolve, reject) => { const testResultFile = path.join(this.testResultsFolder, trxTestName); - let command = `dotnet test${Utility.additionalArgumentsOption} --no-build --logger \"trx;LogFileName=${testResultFile}\"`; + let command = `dotnet test ${Utility.additionalArgumentsOption} --no-build --logger \"trx;LogFileName=${testResultFile}\"`; if (testName && testName.length) { if (isSingleTest) { diff --git a/src/testDiscovery.ts b/src/testDiscovery.ts index 90dfa16..ec4442b 100644 --- a/src/testDiscovery.ts +++ b/src/testDiscovery.ts @@ -46,7 +46,7 @@ export function discoverTests(testDirectoryPath: string, dotnetTestOptions: stri function executeDotnetTest(testDirectoryPath: string, dotnetTestOptions: string): Promise { return new Promise((resolve, reject) => { - const command = `dotnet test -t -v=q${dotnetTestOptions}`; + const command = `dotnet test -t -v=q ${dotnetTestOptions}`; Logger.Log(`Executing ${command} in ${testDirectoryPath}`); diff --git a/src/watch.ts b/src/watch.ts index da4828a..7b0fcf2 100644 --- a/src/watch.ts +++ b/src/watch.ts @@ -41,7 +41,7 @@ export class Watch { const trxPath = path.join(this.testCommands.testResultFolder, `autoWatch${index}.trx`); AppInsightsClient.sendEvent("runWatchCommand"); - const command = `dotnet watch test${Utility.additionalArgumentsOption} --logger "trx;LogFileName=${trxPath}"`; + const command = `dotnet watch test ${Utility.additionalArgumentsOption} --logger "trx;LogFileName=${trxPath}"`; Logger.Log(`Executing ${command} in ${testDirectory}`); const p = Executor.exec(command, (err: any, stdout: string) => { diff --git a/test/testDiscovery.test.ts b/test/testDiscovery.test.ts index a63c1ab..5474256 100644 --- a/test/testDiscovery.test.ts +++ b/test/testDiscovery.test.ts @@ -10,7 +10,7 @@ suite("Test discovery", () => { const testDirectoryPath = "xyz"; const dotnetTestOptions = "foo"; - const dotnetTestExecCmd = `dotnet test -t -v=q${dotnetTestOptions}`; + const dotnetTestExecCmd = `dotnet test -t -v=q ${dotnetTestOptions}`; const assemblyFilePath = "/bin/TestAssembly.dll"; const tmpDir = "/temp";