Skip to content

Commit 3cd5044

Browse files
authored
ci: fix unit test failure with firebase (#13278)
1 parent 2732fa4 commit 3cd5044

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

packages/adapter-firebase/test/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ describe.each([
1919
(config) => {
2020
config.name = `authjs-test-${config.namingStrategy}`
2121
config.projectId = "authjs-test"
22-
config.databaseURL = "http://localhost:8080"
2322

2423
const preferSnakeCase = config.namingStrategy === "snake_case"
2524

packages/adapter-firebase/test/test.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ docker run -d --rm \
77
--name ${CONTAINER_NAME} \
88
-p 8080:8080 \
99
-v "$(pwd)/test/firestore.rules":/firestore.rules \
10-
google/cloud-sdk:latest gcloud beta emulators firestore start \
10+
google/cloud-sdk:emulators gcloud beta emulators firestore start \
1111
--host-port=0.0.0.0:8080 \
1212
--rules=/firestore.rules
1313

14-
echo "Waiting 5s for db to start..."
15-
sleep 5
14+
echo "Waiting 10s for db to start..."
15+
sleep 10
1616

17-
export FIRESTORE_EMULATOR_HOST=0.0.0.0:8080
17+
export FIRESTORE_EMULATOR_HOST=localhost:8080
1818
# Always stop container, but exit with 1 when tests are failing
19-
if pnpm exec vitest run -c ../utils/vitest.config.ts; then
19+
if pnpm exec vitest run -c vitest.config.ts; then
2020
docker stop ${CONTAINER_NAME}
2121
else
2222
docker stop ${CONTAINER_NAME} && exit 1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/// <reference types="vitest" />
2+
3+
import { defineConfig, mergeConfig } from "vite"
4+
import baseConfig from "../utils/vitest.config"
5+
6+
// https://vitejs.dev/config/
7+
export default mergeConfig(
8+
baseConfig,
9+
defineConfig({
10+
test: {
11+
testTimeout: 30000,
12+
hookTimeout: 30000,
13+
},
14+
})
15+
)

0 commit comments

Comments
 (0)