refactor: move jest around and add code coverage
This commit is contained in:
@ -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}
|
||||
|
||||
|
@ -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 "$@"
|
||||
|
Reference in New Issue
Block a user