feat: add testing setup in backend

This commit is contained in:
Lin, Hung-Shin committed 2023-11-17 10:59:47 +08:00
1 parent cb376caff0
commit 1f77328362
15 files changed
+92 -100

No files matched your search

+5
View File
@@ -15,6 +15,7 @@ import errorHandler from './middleware/error.js'
import { globalRateLimit } from './middleware/rateLimiter.js'
import sessionMiddleware from './middleware/session.js'
import expiryRemovalScheduler from './containers/expiryChecker.js'
import setupTest from './utils/test.js'
async function main() {
if (!config.secret) {
@@ -33,6 +34,10 @@ async function main() {
process.exit(1)
}
if (config.testing.enabled) {
await setupTest()
}
await loadAndUpdateQuests()
expiryRemovalScheduler()