diff --git a/adev/src/content/cli/help/_build-info.json b/adev/src/content/cli/help/_build-info.json index d089201cc13..f302de41c16 100644 --- a/adev/src/content/cli/help/_build-info.json +++ b/adev/src/content/cli/help/_build-info.json @@ -1,4 +1,4 @@ { - "branchName": "refs/heads/main", - "sha": "8c2f95904ca04e8fb78b0971ae7648c85a45f2e8" + "branchName": "refs/heads/21.0.x", + "sha": "f5dc1a175a1dfceca47646b98e880c992aaa1f9d" } \ No newline at end of file diff --git a/adev/src/content/cli/help/generate.json b/adev/src/content/cli/help/generate.json index 370a11f9f0b..8fe6f37274e 100644 --- a/adev/src/content/cli/help/generate.json +++ b/adev/src/content/cli/help/generate.json @@ -203,6 +203,16 @@ ], "description": "The type of stylesheet files to be created for components in the application." }, + { + "name": "test-runner", + "type": "string", + "default": "vitest", + "enum": [ + "karma", + "vitest" + ], + "description": "The unit testing runner to use." + }, { "name": "view-encapsulation", "type": "string", diff --git a/adev/src/content/cli/help/new.json b/adev/src/content/cli/help/new.json index 6e5bc707ab5..a4345b245b5 100644 --- a/adev/src/content/cli/help/new.json +++ b/adev/src/content/cli/help/new.json @@ -203,6 +203,16 @@ ], "description": "The type of stylesheet files to be created for components in the initial project." }, + { + "name": "test-runner", + "type": "string", + "default": "vitest", + "enum": [ + "karma", + "vitest" + ], + "description": "The unit testing runner to use." + }, { "name": "view-encapsulation", "type": "string", diff --git a/adev/src/content/cli/help/test.json b/adev/src/content/cli/help/test.json index b80af9d5f3c..f19d5af862b 100644 --- a/adev/src/content/cli/help/test.json +++ b/adev/src/content/cli/help/test.json @@ -10,26 +10,19 @@ "deprecated": false, "options": [ { - "name": "aot", - "type": "boolean", - "default": false, - "description": "Run tests using Ahead of Time compilation." + "name": "browser-viewport", + "type": "string", + "description": "Specifies the browser viewport dimensions for browser-based tests in the format `widthxheight`." }, { "name": "browsers", - "type": "string", - "description": "Override which browsers tests are run against. Set to `false` to not use any browser." - }, - { - "name": "code-coverage", - "type": "boolean", - "default": false, - "description": "Output a code coverage report." - }, - { - "name": "code-coverage-exclude", "type": "array", - "description": "Globs to exclude from code coverage." + "description": "Specifies the browsers to use for test execution. When not specified, tests are run in a Node.js environment using jsdom. For both Vitest and Karma, browser names ending with 'Headless' (e.g., 'ChromeHeadless') will enable headless mode." + }, + { + "name": "build-target", + "type": "string", + "description": "Specifies the build target to use for the unit test build in the format `project:target[:configuration]`. This defaults to the `build` target of the current project with the `development` configuration. You can also pass a comma-separated list of configurations. Example: `project:target:production,staging`." }, { "name": "configuration", @@ -40,19 +33,51 @@ "description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.dev/reference/configs/workspace-config#alternate-build-configurations." }, { - "name": "define", + "name": "coverage", + "type": "boolean", + "default": false, + "description": "Enables coverage reporting for tests." + }, + { + "name": "coverage-exclude", "type": "array", - "description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced." + "description": "Specifies glob patterns of files to exclude from the coverage report." + }, + { + "name": "coverage-include", + "type": "array", + "description": "Specifies glob patterns of files to include in the coverage report." + }, + { + "name": "coverage-reporters", + "type": "array", + "enum": [ + "cobertura", + "html", + "json", + "json-summary", + "lcov", + "lcovonly", + "text", + "text-summary" + ], + "description": "Specifies the reporters to use for coverage results. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'html', 'lcov', 'lcovonly', 'text', 'text-summary', 'cobertura', 'json', and 'json-summary'." + }, + { + "name": "debug", + "type": "boolean", + "default": false, + "description": "Enables debugging mode for tests, allowing the use of the Node Inspector." }, { "name": "exclude", "type": "array", - "description": "Globs of files to exclude, relative to the project root." + "description": "Specifies glob patterns of files to exclude from testing, relative to the project root." }, { - "name": "external-dependencies", - "type": "array", - "description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime." + "name": "filter", + "type": "string", + "description": "Specifies a regular expression pattern to match against test suite and test names. Only tests with a name matching the pattern will be executed. For example, `^App` will run only tests in suites beginning with 'App'." }, { "name": "help", @@ -63,52 +88,26 @@ "name": "include", "type": "array", "default": [ - "**/*.spec.ts" + "**/*.spec.ts", + "**/*.test.ts" ], - "description": "Globs of files to include, relative to project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead." + "description": "Specifies glob patterns of files to include for testing, relative to the project root. This option also has special handling for directory paths (includes all test files within) and file paths (includes the corresponding test file if one exists)." }, { - "name": "inline-style-language", - "type": "string", - "default": "css", - "enum": [ - "css", - "less", - "sass", - "scss" - ], - "description": "The stylesheet language to use for the application's inline component styles." - }, - { - "name": "karma-config", - "type": "string", - "description": "The name of the Karma configuration file." - }, - { - "name": "main", - "type": "string", - "description": "The name of the main entry-point file." - }, - { - "name": "poll", - "type": "number", - "description": "Enable and define the file watching poll time period in milliseconds." - }, - { - "name": "polyfills", - "type": "array", - "description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'." - }, - { - "name": "preserve-symlinks", + "name": "list-tests", "type": "boolean", - "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set." + "default": false, + "description": "Lists all discovered test files and exits the process without building or executing the tests." + }, + { + "name": "output-file", + "type": "string", + "description": "Specifies a file path for the test report, applying only to the first reporter. To configure output files for multiple reporters, use the tuple format `['reporter-name', { outputFile: '...' }]` within the `reporters` option. When not provided, output is written to the console." }, { "name": "progress", "type": "boolean", - "default": true, - "description": "Log progress to the console while building." + "description": "Shows build progress information in the console. Defaults to the `progress` setting of the specified `buildTarget`." }, { "name": "project", @@ -116,42 +115,40 @@ "description": "The name of the project to build. Can be an application or a library.", "positional": 0 }, + { + "name": "providers-file", + "type": "string", + "description": "Specifies the path to a TypeScript file that provides an array of Angular providers for the test environment. The file must contain a default export of the provider array." + }, { "name": "reporters", "type": "array", - "description": "Karma reporters to use. Directly passed to the karma runner." + "description": "Specifies the reporters to use during test execution. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'default', 'verbose', 'dots', 'json', 'junit', 'tap', 'tap-flat', and 'html'. You can also provide a path to a custom reporter." }, { - "name": "scripts", + "name": "runner", + "type": "string", + "default": "vitest", + "enum": [ + "karma", + "vitest" + ], + "description": "Specifies the test runner to use for test execution." + }, + { + "name": "setup-files", "type": "array", - "description": "Global scripts to be included in the build." - }, - { - "name": "source-map", - "type": "boolean", - "default": true, - "description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration." - }, - { - "name": "styles", - "type": "array", - "description": "Global styles to be included in the build." + "description": "A list of paths to global setup files that are executed before the test files. The application's polyfills and the Angular TestBed are always initialized before these files." }, { "name": "ts-config", "type": "string", - "description": "The name of the TypeScript configuration file." + "description": "The path to the TypeScript configuration file, relative to the workspace root. Defaults to `tsconfig.spec.json` in the project root if it exists. If not specified and the default does not exist, the `tsConfig` from the specified `buildTarget` will be used." }, { "name": "watch", "type": "boolean", - "default": true, - "description": "Re-run tests when source files change." - }, - { - "name": "web-worker-ts-config", - "type": "string", - "description": "TypeScript configuration for Web Worker modules." + "description": "Enables watch mode, which re-runs tests when source files change. Defaults to `true` in TTY environments and `false` otherwise." } ] } \ No newline at end of file