Add backend and frontend tests and run them in CI
Build and Publish / Build Yale Access Frontend (pull_request) Successful in 1m17s
Build and Publish / Push Yale Access Frontend Docker Image (pull_request) Skipped
Build and Publish / Build Yale Access Backend (pull_request) Successful in 2m12s
Build and Publish / Push Yale Access Backend Docker Image (pull_request) Skipped
Build and Publish / Build Yale Access Frontend (pull_request) Successful in 1m17s
Build and Publish / Push Yale Access Frontend Docker Image (pull_request) Skipped
Build and Publish / Build Yale Access Backend (pull_request) Successful in 2m12s
Build and Publish / Push Yale Access Backend Docker Image (pull_request) Skipped
- Backend: xUnit integration tests (auth, rate limiting, people, lock codes, validation, error handling) using WebApplicationFactory with a fake lock - Frontend: Vitest + Nuxt test utils for useApi, the auth middleware, LoginForm, UserCodeList and PeopleList - Run both suites in CI before building
This commit is contained in:
1 parent
a9bef7b50d
commit
4fe6f9d7b5
15 files changed
+968
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { defineVitestConfig } from '@nuxt/test-utils/config'
|
||||
|
||||
export default defineVitestConfig({
|
||||
test: {
|
||||
environment: 'nuxt',
|
||||
include: ['test/**/*.test.ts'],
|
||||
// Booting the Nuxt environment can be slow on a cold start (and in CI)
|
||||
hookTimeout: 60_000,
|
||||
testTimeout: 30_000,
|
||||
environmentOptions: {
|
||||
nuxt: {
|
||||
domEnvironment: 'happy-dom',
|
||||
// Empty base URL so $fetch calls hit endpoints registered with registerEndpoint()
|
||||
overrides: {
|
||||
runtimeConfig: { public: { apiBaseUrl: '' } }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user