Skip to content

Commit

Permalink
add the test
Browse files Browse the repository at this point in the history
  • Loading branch information
akshita31 committed Jun 28, 2019
1 parent 60ff49d commit 4bb65d3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/featureTests/assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ suite("Asset generation: csproj", () => {
segments.should.deep.equal(['${workspaceFolder}', 'testApp.csproj']);
});

test("Generated tasks.json has the property GenerateFullPaths set to true ", () => {
let rootPath = path.resolve('testRoot');
let info = createMSBuildWorkspaceInformation(path.join(rootPath, 'testApp.csproj'), 'testApp', 'netcoreapp1.0');
let generator = new AssetGenerator(info, createMockWorkspaceFolder(rootPath));
generator.setStartupProject(0);
let tasksJson = generator.createTasksConfiguration();

tasksJson.tasks.forEach(task => task.args.should.contain("/property:GenerateFullPaths=true"));
});

test("Generated tasks.json has the consoleloggerparameters argument set to NoSummary", () => {
let rootPath = path.resolve('testRoot');
let info = createMSBuildWorkspaceInformation(path.join(rootPath, 'testApp.csproj'), 'testApp', 'netcoreapp1.0');
let generator = new AssetGenerator(info, createMockWorkspaceFolder(rootPath));
generator.setStartupProject(0);
let tasksJson = generator.createTasksConfiguration();

tasksJson.tasks.forEach(task=> task.args.should.contain("/consoleloggerparameters:NoSummary"));
});

test("Create tasks.json for nested project opened in workspace", () => {
let rootPath = path.resolve('testRoot');
let info = createMSBuildWorkspaceInformation(path.join(rootPath, 'nested', 'testApp.csproj'), 'testApp', 'netcoreapp1.0');
Expand Down

0 comments on commit 4bb65d3

Please sign in to comment.