mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
* feat: move adapters repo to new packages dir * fix: rm docusaurus build dir * fix: update .gitignore * fix: reorganise package directories * remove package lock files * fix: folder rename * remove package lock file * fix: jest config paths * update yarn.lock * ignore dynamodb local bin * fix: gitignore * fix: update adapter-test * change adapter-test package json * rename prisma adapter package name * fix paths * update gitignore * run tests with one concurrency * fix: merge conflicts * gitignore dist folders * fix: add jest.config.js to tsconfig ignore * fix: yarn.lock * fix: ignore pouch in turbo commands * ignore jest file * fix: test turbo test cmd * fix: turbo test cmd * test: disable mongodb-adapter temporarily * ignore all dev.db files * simplify gitignore * remove unused dependency * have tsconfig in its own package * remove unnecessary .gitignore files * move jest config to preset * add ts expect error comment * chore: update .gitignore * remove babelrc * don't depend on build for testing in turbo * fix: cleanup testing npm scripts * fix: remove jest-config roots * fix: add fauna jest preset * fix: rm dev.db from prisma mirgation * fix prisma * remove nohoist Co-authored-by: Balázs Orbán <info@balazsorban.com>
34 lines
724 B
Bash
Executable File
34 lines
724 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CONTAINER_NAME=next-auth-mongodb-test
|
|
|
|
JEST_WATCH=false
|
|
|
|
# Is the watch flag passed to the script?
|
|
while getopts w flag
|
|
do
|
|
case "${flag}" in
|
|
w) JEST_WATCH=true;;
|
|
*) continue;;
|
|
esac
|
|
done
|
|
|
|
# Start db
|
|
docker run -d --rm -p 27017:27017 --name ${CONTAINER_NAME} mongo
|
|
|
|
echo "Waiting 3 sec for db to start..."
|
|
sleep 3
|
|
|
|
if $JEST_WATCH; then
|
|
# Run jest in watch mode
|
|
npx jest tests --watch
|
|
# Only stop the container after jest has been quit
|
|
docker stop "${CONTAINER_NAME}"
|
|
else
|
|
# Always stop container, but exit with 1 when tests are failing
|
|
if npx jest;then
|
|
docker stop ${CONTAINER_NAME}
|
|
else
|
|
docker stop ${CONTAINER_NAME} && exit 1
|
|
fi
|
|
fi |