@@ -75,10 +75,10 @@ const listProjectsOutputSchema = {
7575 ` For example, a prefix of 'app' would result in selectors like '<app-my-component>'.` ,
7676 ) ,
7777 unitTestFramework : z
78- . enum ( [ 'jasmine' , 'jest' , ' vitest', 'unknown' ] )
78+ . enum ( [ 'jasmine' , 'vitest' , 'unknown' ] )
7979 . optional ( )
8080 . describe (
81- 'The unit test framework used by the project, such as Jasmine, Jest, or Vitest. ' +
81+ 'The unit test framework used by the project, such as Jasmine, or Vitest. ' +
8282 'This field is critical for generating correct and idiomatic unit tests. ' +
8383 'When writing or modifying tests, you MUST use the APIs corresponding to this framework.' ,
8484 ) ,
@@ -135,9 +135,9 @@ their types, and their locations.
135135<Operational Notes>
136136* **Working Directory:** Shell commands for a project (like \`ng generate\`) **MUST**
137137 be executed from the parent directory of the \`path\` field for the relevant workspace.
138- * **Unit Testing:** The \`unitTestFramework\` field tells you which testing API to use (e.g., Jasmine, Jest ).
138+ * **Unit Testing:** The \`unitTestFramework\` field tells you which testing API to use (e.g., Jasmine).
139139 If the value is 'unknown', you **MUST** inspect the project's configuration files
140- (e.g., \`karma.conf.js\`, \`jest.config.js\`, or the 'test' target in \`angular.json\`) to determine the
140+ (e.g., \`karma.conf.js\`, or the 'test' target in \`angular.json\`) to determine the
141141 framework before generating tests.
142142* **Disambiguation:** A monorepo may contain multiple workspaces (e.g., for different applications or even in output directories).
143143 Use the \`path\` of each workspace to understand its context and choose the correct project.
@@ -337,12 +337,12 @@ type VersioningError = z.infer<typeof listProjectsOutputSchema.versioningErrors>
337337 * It handles both the modern `@angular/build:unit-test` builder with its `runner` option
338338 * and older builders where the framework is inferred from the builder name.
339339 * @param testTarget The 'test' target definition from the workspace configuration.
340- * @returns The name of the unit test framework ('jasmine', 'jest', ' vitest'), 'unknown' if
340+ * @returns The name of the unit test framework ('jasmine', 'vitest'), 'unknown' if
341341 * the framework can't be determined from a known builder, or `undefined` if there is no test target.
342342 */
343343function getUnitTestFramework (
344344 testTarget : import ( '@angular-devkit/core' ) . workspaces . TargetDefinition | undefined ,
345- ) : 'jasmine' | 'jest' | ' vitest' | 'unknown' | undefined {
345+ ) : 'jasmine' | 'vitest' | 'unknown' | undefined {
346346 if ( ! testTarget ) {
347347 return undefined ;
348348 }
@@ -360,13 +360,8 @@ function getUnitTestFramework(
360360 // Fallback for older builders where the framework is inferred from the builder name.
361361 if ( testTarget . builder ) {
362362 const testBuilder = testTarget . builder ;
363- if (
364- testBuilder . includes ( 'karma' ) ||
365- testBuilder === '@angular-devkit/build-angular:web-test-runner'
366- ) {
363+ if ( testBuilder . includes ( 'karma' ) ) {
367364 return 'jasmine' ;
368- } else if ( testBuilder . includes ( 'jest' ) ) {
369- return 'jest' ;
370365 } else if ( testBuilder . includes ( 'vitest' ) ) {
371366 return 'vitest' ;
372367 } else {
0 commit comments