Skip to content

Commit

Permalink
fix(core): test projects not generating
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed May 3, 2021
1 parent 5850830 commit 28d3d1e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .npmrc.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
; Set a new registry for a scoped package
@nx-dotnet:registry=http://localhost:4873
@nx-dotnet:registry=http://localhost:4872
//localhost:4872/:_authToken="fake=="
2 changes: 1 addition & 1 deletion packages/core/src/generators/app/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"items": ["C#", "F#", "VB"]
}
},
"test-template": {
"testTemplate": {
"type": "string",
"description": "Which template should be used for creating the tests project?",
"default": "nunit",
Expand Down
17 changes: 16 additions & 1 deletion packages/core/src/generators/lib/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,22 @@
"type": "list",
"items": ["C#", "F#", "VB"]
}
},
"testTemplate": {
"type": "string",
"description": "Which template should be used for creating the tests project?",
"default": "nunit",
"x-prompt": {
"message": "Which template should be used for creating the tests project",
"type": "list",
"items": [
{ "value": "nunit", "label": "NUnit 3 Test Project" },
{ "value": "xunit", "label": "xUnit Test Project" },
{ "value": "mstest", "label": "Unit Test Project" },
{ "value": "none", "label": "No Unit Test Project" }
]
}
}
},
"required": ["name", "template", "language"]
"required": ["name", "template", "language", "testTemplate"]
}
2 changes: 1 addition & 1 deletion packages/core/src/generators/utils/generate-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export async function GenerateProject(
dotnetClient: DotNetClient,
projectType: ProjectType,
) {
initSchematic(host);
await initSchematic(host);

options.testTemplate = options.testTemplate ?? 'none';

Expand Down

0 comments on commit 28d3d1e

Please sign in to comment.