nixos-config/tests/lib/trivial.nix
Gabriel Arazas 0c78d7b32b
tests/lib: init
WE NOW HAVE TESTS ~3 YEARS INTO DEVELOPMENT, BOI!
2024-03-03 16:43:18 +08:00

21 lines
447 B
Nix

{ pkgs, lib, self }:
lib.runTests {
testCountAttrs = {
expr = self.trivial.countAttrs (n: v: v?enable && v.enable) {
hello.enable = true;
what.enable = false;
atro.enable = true;
adelie = { };
world = "there";
mo = null;
};
expected = 2;
};
testGetConfig = {
expr = self.trivial.getConfig "home-manager" "foo-dogsquared";
expected = ../../configs/home-manager/foo-dogsquared;
};
}