Verify the problem is that the service hasn't started before tests execute
Test / test (push) Successful in 1m31s Details

This commit is contained in:
Jeff 2024-10-19 14:03:10 -04:00
parent 06e82c4f3f
commit 2031e8a3e7
3 changed files with 5 additions and 5 deletions

View File

@ -10,6 +10,8 @@ jobs:
- uses: actions/checkout@v4
- name: Install docker
uses: papodaca/install-docker-action@main
- name: Setup PG Data Dir
run: mkdir -p ./data-test
- name: Run Tests
env: NODE_OPTIONS=--max-old-space-size=8192
run: |

View File

@ -28,7 +28,7 @@ const pushSubscription2 = {
}
jest.mock("./settings", () => ({
port: 5432,
port: 5434,
user: "postgres",
password: process.env.POSTGRES_PASSWORD,
database: "test",
@ -53,9 +53,7 @@ describe("subscriptions", () => {
beforeEach(async () => {
try {
exec("docker compose -f docker-compose-test.yaml logs", (_, out) =>
console.log(out)
)
exec("docker ps", (_, out) => console.log(out))
await migrateToLatest()
} catch (error) {
console.log("Something has exploded in migration")

View File

@ -10,7 +10,7 @@
"start": "remix-serve ./build/server/index.js",
"typecheck": "tsc",
"watch": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && jest --watch --config=jest.config.ts",
"test": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && jest --config=jest.config.ts"
"test": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && sleep 5 && jest --config=jest.config.ts"
},
"dependencies": {
"@remix-pwa/sw": "^3.0.9",