Archived
1
0

refactor: move jest around and add code coverage

This commit is contained in:
Joe Previte
2021-01-21 16:39:04 -07:00
parent 883dd13850
commit 05beccf671
10 changed files with 40 additions and 53 deletions

View File

@ -5,6 +5,11 @@ main() {
cd "$(dirname "$0")/../.."
source ./ci/lib.sh
# This installs the dependencies needed for testing
cd test
yarn
cd ..
cd lib/vscode
yarn ${CI+--frozen-lockfile}

View File

@ -3,12 +3,13 @@ set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
cd test/test-plugin
make -s out/index.js
cd "$OLDPWD/test"
yarn
yarn test "$@"
# We must keep jest in a sub-directory. See ../../test/package.json for more
# information. We must also run it from the root otherwise coverage will not
# include our source files.
cd "$OLDPWD"
./test/node_modules/.bin/jest "$@"
}
main "$@"