From 9fc6361ef7dca2780da33b7d1523bdaabd44f81c Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 3 Mar 2024 23:19:59 +0800 Subject: [PATCH] Revert "fix: test error" This reverts commit 310180d61ff8b69cb884b18803f2fb7b5af6d9d4. --- lib/routes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes.ts b/lib/routes.ts index c6ad7286dc..e68af2c88c 100644 --- a/lib/routes.ts +++ b/lib/routes.ts @@ -13,7 +13,7 @@ type Root = { const routes: Record 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'),