about summary refs log tree commit diff
path: root/nixos/tests/npmrc.nix
blob: dbf24d372feb4a6188dde1a2542f2bbbab20ca8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import ./make-test-python.nix ({ ... }:
let
  machineName = "machine";
  settingName = "prefix";
  settingValue = "/some/path";
in
{
  name = "npmrc";

  nodes."${machineName}".programs.npm = {
    enable = true;
    npmrc = ''
      ${settingName} = ${settingValue}
    '';
  };

  testScript = ''
    ${machineName}.start()

    assert ${machineName}.succeed("npm config get ${settingName}") == "${settingValue}\n"
  '';
})