better jq filter
This commit is contained in:
parent
2df95bbc56
commit
a60eba976f
|
@ -8,12 +8,13 @@
|
||||||
inotify-tools = "inotify-tools";
|
inotify-tools = "inotify-tools";
|
||||||
};
|
};
|
||||||
watch = import ../tix/watch.nix mockpkgs;
|
watch = import ../tix/watch.nix mockpkgs;
|
||||||
in
|
in [
|
||||||
describe "watch" [
|
(describe "watch" [
|
||||||
(it "contains the command" {
|
(it "contains the command" {
|
||||||
actual = builtins.match ".*(run me).*" (watch {
|
actual = builtins.match ".*(run me).*" (watch {
|
||||||
cmd = "run me";
|
cmd = "run me";
|
||||||
});
|
});
|
||||||
expected = ["run me"];
|
expected = ["run me"];
|
||||||
})
|
})
|
||||||
|
])
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
let
|
let
|
||||||
emotes = import ./emotes.nix;
|
emotes = import ./emotes.nix;
|
||||||
in {
|
in rec {
|
||||||
overview = ''
|
failures = ''
|
||||||
.[] | {
|
[. | map(select(.results[].results[].success == false))[]
|
||||||
(.path):
|
| {
|
||||||
.results[] | {
|
(.path): .results | map(select(.results[].success == false))[]
|
||||||
(.component): {
|
| {
|
||||||
"${emotes.fail}": [
|
(.component): .results | map(select(.success == false))[]
|
||||||
.results | map(select(.success==false))[] | {(.msg): {actual, expected}}
|
| {
|
||||||
],
|
(.msg): {success, expected, actual}
|
||||||
"${emotes.pass}": .results | map(select(.success) | .msg) | length
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}] | add
|
||||||
'';
|
'';
|
||||||
|
overview = failures;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue