docs(testing): clarify apps & libs can be component tested (#15261)

This commit is contained in:
Caleb Ukle 2023-02-28 15:43:02 -06:00 committed by GitHub
parent 2d2804b0c1
commit cd8daa913d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ nx g @nrwl/angular:cypress-component-configuration --project=your-project
You can optionally pass in `--generate-tests` to create component tests for all components within the library.
Component testing leverages a build target within your workspace as the base for running the tests. The build target is usually an app within the workspace. By default, the generator attempts to find the build target for you based on the project usage, but you can manually specify the build target to use via the `--build-target` option.
Component testing supports both applications and libraries. By default, the generator attempts to find the build target for you based on the project's dependent apps. But you can manually specify the build target to use via the `--build-target` option. Note, in most cases, the build target will be from a different project than the one being configured. The only case where the build targets are from the same project is when the component tests are being added to an application.
```shell
nx g @nrwl/react:cypress-component-configuration --project=your-project --build-target=my-react-app:build

View File

@ -20,7 +20,7 @@ nx g @nrwl/angular:cypress-component-configuration --project=your-project
You can optionally pass in `--generate-tests` to create component tests for all components within the library.
Component testing leverages a build target within your workspace as the base for running the tests. The build target is usually an app within the workspace. By default, the generator attempts to find the build target for you based on the project usage, but you can manually specify the build target to use via the `--build-target` option.
Component testing supports both applications and libraries. By default, the generator attempts to find the build target for you based on the project's dependent apps. But you can manually specify the build target to use via the `--build-target` option. Note, in most cases, the build target will be from a different project than the one being configured. The only case where the build targets are from the same project is when the component tests are being added to an application.
```shell
nx g @nrwl/react:cypress-component-configuration --project=your-project --build-target=my-react-app:build