Revert "fix: test error"

This reverts commit 310180d61f.
This commit is contained in:
DIYgod 2024-03-03 23:19:59 +08:00
parent 310180d61f
commit 9fc6361ef7
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ type Root = {
const routes: Record<string, (root: Root) => void> = {};
if (process.env.NODE_ENV === 'test') {
routes.test = require('./routes/test/router').default;
routes.test = (await import('./routes/test/router')).default;
} else {
const imports = directoryImport({
targetDirectoryPath: path.join(__dirname, './routes'),