-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd5591e
commit 8de2ac0
Showing
4 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ repo-name = doctest | |
author-name = David Chambers <[email protected]> | ||
source-files = bin/doctest lib/**/*.js | ||
readme-source-files = | ||
test-files = test/index.js | ||
version-tag-prefix = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
#!/usr/bin/env bash | ||
set -euf -o pipefail | ||
|
||
source "${BASH_SOURCE%/*}/../node_modules/sanctuary-scripts/functions" | ||
source "$(dirname "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")/node_modules/sanctuary-scripts/functions" | ||
|
||
branches="$(get min-branch-coverage)" | ||
|
||
set +f ; shopt -s globstar nullglob | ||
files=($(get source-files)) | ||
# shellcheck disable=SC2207 | ||
source_files=($(get source-files)) | ||
# shellcheck disable=SC2207 | ||
test_files=($(get test-files)) | ||
set -f ; shopt -u globstar nullglob | ||
|
||
node_modules/.bin/c8 \ | ||
--check-coverage \ | ||
--100 \ | ||
--reporter text \ | ||
--reporter html \ | ||
$(printf ' --include %s' "${files[@]}") \ | ||
node --experimental-vm-modules -- node_modules/.bin/oletus -- test/index.js | ||
args=( | ||
--check-coverage | ||
--branches "$branches" | ||
--functions 0 | ||
--lines 0 | ||
--statements 0 | ||
) | ||
for name in "${source_files[@]}" ; do | ||
args+=(--include "$name") | ||
done | ||
node_modules/.bin/c8 "${args[@]}" -- node --experimental-vm-modules -- node_modules/.bin/oletus -- "${test_files[@]}" |