Skip to content

Commit

Permalink
add integration tests with emulators
Browse files Browse the repository at this point in the history
  • Loading branch information
codyzu committed Jul 10, 2023
1 parent d632916 commit dc196ff
Show file tree
Hide file tree
Showing 13 changed files with 4,297 additions and 1,012 deletions.
2 changes: 1 addition & 1 deletion .firebaserc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"default": "supa-presentation"
},
"etags": {}
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ dist-ssr
*.sln
*.sw?

coverage

.firebase
.env

Expand Down
14 changes: 13 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,17 @@
"firebase-debug.*.log"
]
}
]
],
"emulators": {
"auth": {
"port": 9099
},
"firestore": {
"port": 8080
},
"ui": {
"enabled": true
},
"singleProjectMode": true
}
}
17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
"build:functions": "pnpm --dir functions build",
"build:all": "pwa-assets-generator && pnpm run build && pnpm run build:functions",
"deploy": "firebase deploy",
"generate-pwa-assets": "pwa-assets-generator"
"generate-pwa-assets": "pwa-assets-generator",
"test": "VITE_FIREBASE_PROJECT_ID=demo-test firebase emulators:exec --project demo-test --only auth,firestore,storage vitest",
"test:ui": "VITE_FIREBASE_PROJECT_ID=demo-test firebase emulators:exec --project demo-test --only auth,firestore,storage 'vitest --ui'",
"coverage": "VITE_FIREBASE_PROJECT_ID=demo-test firebase emulators:exec --project demo-test --only auth,firestore,storage 'vitest run --coverage'"
},
"dependencies": {
"@unocss/reset": "^0.53.3",
"clsx": "^1.2.1",
"firebase": "^9.22.1",
"firebase": "^10.0.0",
"nanoid": "^4.0.2",
"pdfjs-dist": "3.6.172",
"react": "^18.2.0",
Expand All @@ -37,8 +40,12 @@
"@iconify-json/fluent-emoji-flat": "^1.1.11",
"@iconify-json/line-md": "^1.1.25",
"@iconify-json/tabler": "^1.1.77",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/react": "^18.2.7",
"@types/react-dom": "^18.0.11",
"@types/testing-library__jest-dom": "^5.14.7",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"@unocss/preset-icons": "^0.53.3",
Expand All @@ -49,17 +56,21 @@
"@unocss/transformer-variant-group": "^0.53.3",
"@vite-pwa/assets-generator": "^0.0.3",
"@vitejs/plugin-react": "^4.0.0",
"@vitest/coverage-v8": "^0.33.0",
"@vitest/ui": "^0.33.0",
"eslint": "^8.41.0",
"eslint-config-xo-react": "^0.27.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.1",
"firebase-tools": "^12.2.1",
"firebase-tools": "^12.4.3",
"husky": "^8.0.3",
"jsdom": "^22.1.0",
"typescript": "^5.0.2",
"unocss": "^0.53.3",
"vite": "^4.3.9",
"vite-plugin-pwa": "^0.16.4",
"vitest": "^0.33.0",
"workbox-window": "^7.0.0",
"xo": "^0.54.2"
}
Expand Down
Loading

0 comments on commit dc196ff

Please sign in to comment.