@nrwl/angular:component-test

Create a *.cy.ts file for Cypress component testing for an Angular component.

Usage

nx generate component-test ...

By default, Nx will search for component-test in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/angular:component-test ...

Show what will be generated without writing to disk:

nx g component-test ... --dry-run

Options

componentName

Required
string

Class name of the component to create a test for.

componentDir

Required
string

Relative path to the folder that contains the component from the project root.

componentFileName

Required
string

File name that contains the component without the .ts extension.

project

Required
string

The name of the project where the component is located.

skipFormat

boolean
Default: false

Skip formatting files.