Skip to content

Commit

Permalink
Run jest using npm exec
Browse files Browse the repository at this point in the history
`npm bin` was removed: npm/cli#5459

Signed-off-by: Andrew Haines <haines@cerbos.dev>
  • Loading branch information
haines committed Nov 10, 2022
1 parent af75d5c commit b09acba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/test/scripts/jest
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o nounset
set -o pipefail

node_version=$(node --version)
npm_bin=$(npm bin)
npm=$(which npm)

node_command=(node)

Expand All @@ -16,4 +16,4 @@ esac

export NODE_EXTRA_CA_CERTS=servers/tmp/certificates/server.root.crt

exec "${node_command[@]}" "${npm_bin}/jest" "$@"
exec "${node_command[@]}" "${npm}" exec -- jest "$@"

0 comments on commit b09acba

Please sign in to comment.