node-print: fix tests

This commit is contained in:
ptrcnull 2024-01-26 16:41:47 +01:00
parent f7ec514f1a
commit 31856bd4c5
Signed by: ptrcnull
GPG key ID: 411F7B30801DD9CA

View file

@ -19,9 +19,10 @@ check() {
node --experimental-test-coverage --test > output.txt node --experimental-test-coverage --test > output.txt
# ensure coverage # ensure coverage
local cov_lines="$(grep -F index.js output.txt | cut -d' ' -f4 | cut -d. -f1)" local results="$(grep -F index.js output.txt)"
local cov_lines="$(echo $results | cut -d' ' -f4 | cut -d. -f1)"
[ "$cov_lines" -gt 90 ] [ "$cov_lines" -gt 90 ]
local cov_branches="$(grep -F index.js output.txt | cut -d' ' -f6 | cut -d. -f1)" local cov_branches="$(echo $results | cut -d' ' -f6 | cut -d. -f1)"
[ "$cov_branches" -gt 90 ] [ "$cov_branches" -gt 90 ]
} }