Cypress: Difference between revisions

imported>Pbek
Mention steam-run and cypress packages
 
Klinger (talk | contribs)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
You cannot use cypress directly with npm. You can either run it with <code>steam-run</code> or install the <code>cypress</code> package.
[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 cypress tests:
== 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 {
     nativeBuildInputs = with pkgs; [
     packages = with pkgs; [
       nodejs
       nodejs
       cypress
       cypress
Line 13: Line 17:
</syntaxHighlight>
</syntaxHighlight>


You can then just run <code>nix-shell --run "Cypress"</code> to open the Cypress UI and then select your project.
You can then run <code>nix-shell --run "Cypress"</code> to open the Cypress UI and select your project.
 
== References ==
 
<references />
 
[[Category:Development]]