tests: fix test.assert.assertions.enable not working
Co-authored-by: Robert Helgesson <robert@rycee.net>
This commit is contained in:
parent
4fa1ba72a3
commit
b78b584368
|
@ -37,17 +37,13 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf config.test.asserts.warnings.enable {
|
||||
config = mkMerge [
|
||||
(mkIf config.test.asserts.warnings.enable {
|
||||
home.file = {
|
||||
"asserts/warnings.actual".text = concatStringsSep ''
|
||||
|
||||
--
|
||||
'' config.warnings;
|
||||
|
||||
"asserts/assertions.actual".text = concatStringsSep ''
|
||||
|
||||
--
|
||||
'' (map (x: x.message) (filter (x: !x.assertion) config.assertions));
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
|
@ -59,7 +55,18 @@ with lib;
|
|||
--
|
||||
'' config.test.asserts.warnings.expected)
|
||||
}
|
||||
'';
|
||||
})
|
||||
|
||||
(mkIf config.test.asserts.assertions.enable {
|
||||
home.file = {
|
||||
"asserts/assertions.actual".text = concatStringsSep ''
|
||||
|
||||
--
|
||||
'' (map (x: x.message) (filter (x: !x.assertion) config.assertions));
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/asserts/assertions.actual \
|
||||
${
|
||||
|
@ -69,5 +76,6 @@ with lib;
|
|||
'' config.test.asserts.assertions.expected)
|
||||
}
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue