Cypress: Difference between revisions

From NixOS Wiki
Copyedit, add lead
Klinger (talk | contribs)
 
Line 22: Line 22:


<references />
<references />
[[Category:Development]]

Latest revision as of 20:21, 25 June 2024

Cypress is a frontend testing framework for web applications.

NixOS

You cannot use Cypress directly with npm while running on NixOS.[1] You can either run it with steam-run or use the cypress package.

For example, put this shell.nix in the directory with your Cypress tests:

{ pkgs ? import <nixpkgs> {} }:
  pkgs.mkShell {
    packages = with pkgs; [
      nodejs
      cypress
    ];
}

You can then run nix-shell --run "Cypress" to open the Cypress UI and select your project.

References