Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Commit 28d3d1e

Browse files
author
Craigory Coppola
committed
fix(core): test projects not generating
1 parent 5850830 commit 28d3d1e

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

.npmrc.local

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
; Set a new registry for a scoped package
2-
@nx-dotnet:registry=http://localhost:4873
2+
@nx-dotnet:registry=http://localhost:4872
3+
//localhost:4872/:_authToken="fake=="

packages/core/src/generators/app/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"items": ["C#", "F#", "VB"]
4040
}
4141
},
42-
"test-template": {
42+
"testTemplate": {
4343
"type": "string",
4444
"description": "Which template should be used for creating the tests project?",
4545
"default": "nunit",

packages/core/src/generators/lib/schema.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,22 @@
3838
"type": "list",
3939
"items": ["C#", "F#", "VB"]
4040
}
41+
},
42+
"testTemplate": {
43+
"type": "string",
44+
"description": "Which template should be used for creating the tests project?",
45+
"default": "nunit",
46+
"x-prompt": {
47+
"message": "Which template should be used for creating the tests project",
48+
"type": "list",
49+
"items": [
50+
{ "value": "nunit", "label": "NUnit 3 Test Project" },
51+
{ "value": "xunit", "label": "xUnit Test Project" },
52+
{ "value": "mstest", "label": "Unit Test Project" },
53+
{ "value": "none", "label": "No Unit Test Project" }
54+
]
55+
}
4156
}
4257
},
43-
"required": ["name", "template", "language"]
58+
"required": ["name", "template", "language", "testTemplate"]
4459
}

packages/core/src/generators/utils/generate-project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export async function GenerateProject(
178178
dotnetClient: DotNetClient,
179179
projectType: ProjectType,
180180
) {
181-
initSchematic(host);
181+
await initSchematic(host);
182182

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

0 commit comments

Comments
 (0)