mirror of
https://github.com/embarklabs/web3.js.git
synced 2026-08-30 22:21:10 +00:00
* Add karma & chrome/firefox headless browser fixtures * Add test helper for conditional web3 require * Add websocket port test helper * Move build/lint to their own CI job * Fix package-lock from rebase * Fix ci.sh * Skip all websockets tests for geth.instamine
34 lines
813 B
Bash
Executable File
34 lines
813 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# -------------------------------------------------------------------------------------
|
|
# Runs mocha tests tagged 'e2e' vs firefox headless + insta-mining ganache client
|
|
# -------------------------------------------------------------------------------------
|
|
|
|
# Exit immediately on error
|
|
set -o errexit
|
|
|
|
# Run cleanup on exit
|
|
trap cleanup EXIT
|
|
|
|
cleanup() {
|
|
if [ -n "$client" ]; then
|
|
kill -9 $client
|
|
fi
|
|
}
|
|
|
|
echo " "
|
|
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
|
|
echo "E2E: firefox headless browser "
|
|
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
|
|
echo " "
|
|
|
|
# Launch ganache, track its PID and wait until port is open
|
|
npx ganache-cli --noVMErrorsOnRPCResponse > /dev/null &
|
|
client=$!
|
|
npx wait-port 8545
|
|
|
|
# Test
|
|
karma start \
|
|
--single-run \
|
|
--browsers FirefoxHeadless
|