
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
@cypress/angular
Advanced tools
Mount Angular components in the open source Cypress.io test runner v7.0.0+
Note: This package is bundled with the
cypress
package and should not need to be installed separately. See the Angular Component Testing Docs for mounting Angular components. Installing and importingmount
from@cypress/angular
should only be used for advanced use-cases.
npm install --save-dev @cypress/angular
Open cypress test runner
npx cypress open --component
If you need to run test in CI
npx cypress run --component
For more information, please check the official docs for running Cypress and for component testing.
mount
is the most important function, allows to mount a given Angular component as a mini web application and interact with it using Cypress commandsMountConfig
Configuration used to configure your testcreateOutputSpy
factory function that creates new EventEmitter for your component and spies on it's emit
method.import { mount } from '@cypress/angular'
import { HelloWorldComponent } from './hello-world.component'
describe('HelloWorldComponent', () => {
it('works', () => {
mount(HelloWorldComponent)
// now use standard Cypress commands
cy.contains('Hello World!').should('be.visible')
})
})
import { mount } from '@cypress/angular'
import { HelloWorldComponent } from './hello-world.component'
describe('HelloWorldComponent', () => {
it('works', () => {
mount('<app-hello-world></app-hello-world>', {
declarations: [HelloWorldComponent]
})
// now use standard Cypress commands
cy.contains('Hello World!').should('be.visible')
})
})
Look at the examples in cypress-component-testing-apps repo. Here in the angular
and angular-standalone
folders are the two example applications showing various testing scenarios.
@cypress/angular | cypress |
---|---|
>= v1 | >= v10.5 |
Run yarn build
to compile and sync packages to the cypress
cli package.
This project is licensed under the terms of the MIT license.
FAQs
Test Angular Components with Cypress
The npm package @cypress/angular receives a total of 1,139 weekly downloads. As such, @cypress/angular popularity was classified as popular.
We found that @cypress/angular demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.