mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
* refactor(ts): export `AdapterAccount` from `next-auth/adapters` * chore: run linter, remove prisma warning * fix(ts): match TS with implementation closer * remove unused import * rename error * add missing dev dependency * fix type * fix type * fix more types and tests * remove unused `id` * skip upstash tests in CI * revert some changes * fix type * revert some change * revert some change * revert some change * revert some changes * update lock file * revert line change * revert some change * improve adapter & oauth typing * fix test, revert * apply review suggestion * Add test for new rejection logics * Update assert.test.ts * fix: Hubspot config * restore some ts-expect-error * fix: tests in mirko-orm * fix: remove redundant id: string * fix: use ts-expect-errors * fix: simplify provider type * fix: normalize user options * restore ts-expect-errors Co-authored-by: Thang Vu <hi@thvu.dev>
46 lines
1.1 KiB
Bash
Executable File
46 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
NEO4J_USER=neo4j
|
|
NEO4J_PASS=password
|
|
CONTAINER_NAME=next-auth-neo4j-test-e
|
|
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 \
|
|
-e NEO4J_AUTH=${NEO4J_USER}/${NEO4J_PASS} \
|
|
-e TEST_NEO4J_USER=${NEO4J_USER} \
|
|
-e TEST_NEO4J_PASS=${NEO4J_PASS} \
|
|
--name "${CONTAINER_NAME}" \
|
|
-p7474:7474 -p7687:7687 \
|
|
neo4j:4.2.0
|
|
|
|
# For debug or testing it may be useful to use neo4j enterprise edition.
|
|
# Use the lines below in the docker run statement.
|
|
# -e NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
|
|
# neo4j:4.2.0-enterprise
|
|
|
|
echo "Waiting 10 sec for db to start..." && sleep 10
|
|
|
|
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 tests --detectOpenHandles --forceExit;then
|
|
docker stop "${CONTAINER_NAME}"
|
|
else
|
|
docker stop "${CONTAINER_NAME}" && exit 1
|
|
fi
|
|
fi
|