nixpkgs/nixos/tests/npmrc.nix

23 lines
426 B
Nix
Raw Normal View History

2023-11-02 08:43:20 +01:00
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"
'';
})