From 391fee38111555e35d225d99524f0b2dc71542d2 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 16 Apr 2019 11:54:28 -0700 Subject: [PATCH 1/2] Fix tests --- .../diagnostics/checks/invalidLaunchJsonDebugger.unit.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/application/diagnostics/checks/invalidLaunchJsonDebugger.unit.test.ts b/src/test/application/diagnostics/checks/invalidLaunchJsonDebugger.unit.test.ts index ce6cf3d52899..eeba414f9846 100644 --- a/src/test/application/diagnostics/checks/invalidLaunchJsonDebugger.unit.test.ts +++ b/src/test/application/diagnostics/checks/invalidLaunchJsonDebugger.unit.test.ts @@ -369,7 +369,7 @@ suite('Application Diagnostics - Checks if launch.json is invalid', () => { fs.setup(w => w.writeFile(TypeMoq.It.isAnyString(), correctedlaunchJson)) .returns(() => Promise.resolve()) .verifiable(TypeMoq.Times.once()); - await (diagnosticService as any).fixLaunchJson(DiagnosticCodes.InvalidDebuggerTypeDiagnostic); + await (diagnosticService as any).fixLaunchJson(DiagnosticCodes.ConsoleTypeDiagnostic); workspaceService.verifyAll(); fs.verifyAll(); }); From 756f87773ca8f6045d45d3ba63a4870de593c119 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 16 Apr 2019 12:00:08 -0700 Subject: [PATCH 2/2] Run tests --- build/ci/templates/test_phases.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build/ci/templates/test_phases.yml b/build/ci/templates/test_phases.yml index 04f1aca37743..c822fe73c1e6 100644 --- a/build/ci/templates/test_phases.yml +++ b/build/ci/templates/test_phases.yml @@ -112,6 +112,17 @@ steps: displayName: 'code hygiene' condition: and(succeeded(), contains(variables['TestsToRun'], 'runHygiene')) + # Run the typescript unit tests. + # + # This will only run if the string 'testUnitTests' exists in variable `TestsToRun` + # + # Example command line (windows pwsh): + # > npm run test:unittests + - bash: | + npm run test:unittests + displayName: 'run test:unittest' + condition: and(succeeded(), contains(variables['TestsToRun'], 'testUnitTests')) + # Upload the test results to Azure DevOps to facilitate test reporting in their UX. - task: PublishTestResults@2 displayName: 'Publish test:unittest results'