nx/docs/node/api-react/generators/component-cypress-spec.md
Craigory V Coppola a1ccc87a07
docs(misc): documentation headers should include collectionName for searchability (#6451)
Signed-off-by: AgentEnder <craigorycoppola@gmail.com>
2021-07-21 11:40:59 -04:00

936 B

@nrwl/react:component-cypress-spec

Create a cypress spec for a ui component that has a story

Usage

nx generate component-cypress-spec ...

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

You can specify the collection explicitly as follows:

nx g @nrwl/react:component-cypress-spec ...

Show what will be generated without writing to disk:

nx g component-cypress-spec ... --dry-run

Options

componentPath (required)

Type: string

Relative path to the component file from the library root?

project (required)

Type: string

The project name for which to generate tests.

cypressProject

Type: string

The Cypress project to generate the stories under. By default, inferred from 'project'

js

Default: false

Type: boolean

Generate JavaScript files rather than TypeScript files.