Skip to content

Commit

Permalink
chore: fix command to run integ tests (#20414)
Browse files Browse the repository at this point in the history
The instructions in `CONTRIBUTING.md`, telling users to run `test.sh`,
started running the unit tests instead of the integ tests, since `npx`
now `cd`s to the `package.json` directory (instead of running in the
current directory).

Fix by using `npx` to look up the location of `jest`, but running
it in the current shell.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored May 23, 2022
1 parent 0f52813 commit dd4c2b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/aws-cdk/test/integ/common/jest-test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ function invokeJest() {
# This must --runInBand because parallelism is arranged for inside the tests
# themselves and they must run in the same process in order to coordinate to
# make sure no 2 tests use the same region at the same time.
npx jest --runInBand --verbose "$@"
#
# Jest is run in a weird way because npx started (NPM 8?) to change directory
# into 'package.json' root, which we don't want here.
$(npx which jest) --runInBand --verbose "$@"
}

0 comments on commit dd4c2b5

Please sign in to comment.