aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/dashboard/check.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/api/dashboard/check.nix b/src/api/dashboard/check.nix
new file mode 100644
index 0000000..7276768
--- /dev/null
+++ b/src/api/dashboard/check.nix
@@ -0,0 +1,27 @@
+# Node.js with Playwright's library and its Chromium, all from nixpkgs, for the
+# dashboard's browser checks (`check.js`):
+#
+# nix-shell src/api/dashboard/check.nix --run \
+# 'cargo test --features most dashboard_in_a_browser -- --ignored'
+#
+# nixpkgs builds Playwright's library (`playwright-core`) as `playwright-driver`, with
+# browsers of its version in `playwright-driver.browsers`: so the two match, and nothing
+# comes from npm.
+{
+ pkgs ? import <nixpkgs> { },
+}:
+let
+ driver = pkgs.playwright-driver;
+in
+pkgs.mkShell {
+ packages = [ pkgs.nodejs ];
+ # Where Node finds `require("playwright-core")`.
+ NODE_PATH = pkgs.linkFarm "continuum-dashboard-check-modules" [
+ {
+ name = "playwright-core";
+ path = driver;
+ }
+ ];
+ PLAYWRIGHT_BROWSERS_PATH = driver.browsers;
+ PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = "true";
+}