-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
# Get the directory where the script is located | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# Check that we have TEST_FRONT_DATABASE_URI set | ||
if [ -z "$TEST_FRONT_DATABASE_URI" ]; then | ||
echo "Error: TEST_FRONT_DATABASE_URI is not set" | ||
exit 1 | ||
fi | ||
|
||
# Init the test db | ||
echo "Synching test db schemas..." | ||
NODE_ENV=TEST FRONT_DATABASE_URI=$TEST_FRONT_DATABASE_URI npx tsx "$SCRIPT_DIR/db.ts" | ||
|
||
# Start the tests | ||
FRONT_DATABASE_URI=$TEST_FRONT_DATABASE_URI npm run test |