[Templates][Fixes #14216] Enables running angular npm tests

This commit is contained in:
Javier Calvarro Nelson 2019-09-21 11:06:24 -07:00
parent 2257156346
commit ee9c8bb36d
1 changed files with 3 additions and 5 deletions

View File

@ -66,11 +66,9 @@ namespace Templates.Test.SpaTemplateTest
using var lintResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, "npm run lint"); using var lintResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, "npm run lint");
Assert.True(0 == lintResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run lint", Project, lintResult)); Assert.True(0 == lintResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run lint", Project, lintResult));
if (template != "angular") var testcommand = "npm run test" + template == "angular" ? "-- --watch=false" : "";
{ var testResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, testcommand);
var testResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, "npm run test"); Assert.True(0 == testResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run test", Project, testResult));
Assert.True(0 == testResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run test", Project, testResult));
}
using var publishResult = await Project.RunDotNetPublishAsync(); using var publishResult = await Project.RunDotNetPublishAsync();
Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult));