Cypress: Difference between revisions
imported>Pbek Mention steam-run and cypress packages |
Tomodachi94 (talk | contribs) Copyedit, add lead |
||
Line 1: | Line 1: | ||
[https://www.cypress.io/ Cypress] is a frontend testing framework for web applications. | |||
For example, put this <code>shell.nix</code> in the directory with your | == NixOS == | ||
You cannot use Cypress directly with [[npm]] while running on [[NixOS]].<ref>https://github.com/cypress-io/cypress/issues/3530</ref> You can either run it with [[steam-run|<code>steam-run</code>]] or use the <code>cypress</code> package. | |||
For example, put this <code>shell.nix</code> in the directory with your Cypress tests: | |||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
{ pkgs ? import <nixpkgs> {} }: | { pkgs ? import <nixpkgs> {} }: | ||
pkgs.mkShell { | pkgs.mkShell { | ||
packages = with pkgs; [ | |||
nodejs | nodejs | ||
cypress | cypress | ||
Line 13: | Line 17: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
You can then | You can then run <code>nix-shell --run "Cypress"</code> to open the Cypress UI and select your project. | ||
== References == | |||
<references /> |
Revision as of 05:41, 21 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.