feat: run integration tests using nightwatch js

This commit is contained in:
Aravinth Manivannan
2023-04-30 20:17:51 +05:30
parent 90e60b0486
commit 9cc667851c
2 changed files with 22 additions and 0 deletions

19
scripts/integration.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
readonly PROJECT_ROOT=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}")))
source $PROJECT_ROOT/scripts/lib.sh
docker-compose down -v --remove-orphans || true
docker-compose up -d
cd $(mktemp -d)
git clone https://github.com/mCaptcha/integration .
yarn install
npx nightwatch ./test/mCaptcha.ts
cd $PROJECT_ROOT
docker-compose down -v --remove-orphans || true