New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cypress/schematic

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/schematic

Official Cypress schematic for the Angular CLI

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
83K
decreased by-19.91%
Maintainers
1
Weekly downloads
 
Created
Source

Cypress Angular Schematic

Cypress Logo

Add Cypress to an Angular CLI project

This schematic will:

  • install Cypress, its dependencies, and new scripts
  • add necessary files for Cypress to work with Angular & Typescript
  • prompt for removal of Protractor files and configuration

Usage 🚀

Run as one command in an Angular CLI app directory. Note this will add the schematic as a dependency to your project.

ng add @cypress/schematic

With the custom builder installed, you can run cypress with the following commands:

ng e2e
ng run {your-project-name}:cypress-open

These two commands do the same thing. They will launch the (Electron) Cypress Test Runner in watch mode.

ng run {your-project-name}:cypress-run

This command will open the (Electron) Cypress Test Runner and run your tests one time, with output to your terminal.

Issues

Issues with this schematic can be filed here.

Getting started

Prerequisites

The only requirement for this project is Node.js.

TypeScript will be added as a local dependency to the project, so no need to install it.

Installation

Install the dependencies for the schematic and the sandbox application

yarn install && cd sandbox && yarn install && cd ..

🖇 Link the schematic in the sandbox to run locally

yarn link:sandbox

🏃 Run the schematic

yarn build:clean:launch

Testing

To test locally, use the schematics command line tool that is included locally. That tool acts the same as the generate command of the Angular CLI, but also has a debug mode.

Check the documentation with

schematics --help

Unit & Integration Testing

yarn test:schematics will run the schematic unit tests, using Jasmine as a runner and test framework. yarn test:builders will run the builder integration tests, linking the schematic, and installing Cypress into the sandbox to run the included Cypress spec.

Keywords

FAQs

Package last updated on 12 May 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc