fix: test error

This commit is contained in:
DIYgod
2024-03-03 19:07:40 +08:00
parent 38e42156a0
commit 1ba7bc25bb
2 changed files with 3 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ const dirname = path.join(__dirname + '../../../lib/routes');
const toSource = require('tosource'); const toSource = require('tosource');
// Namespaces that do not require radar.js // Namespaces that do not require radar.js
const allowNamespace = new Set(['discourse', 'discuz', 'ehentai', 'lemmy', 'mail', 'test', 'index.ts', 'robots.txt.ts']); const allowNamespace = new Set(['discourse', 'discuz', 'ehentai', 'lemmy', 'mail', 'test', 'index.tsx', 'robots.txt.ts']);
// Check if a radar.js file is exist under each folder of dirname // Check if a radar.js file is exist under each folder of dirname
for (const dir of fs.readdirSync(dirname)) { for (const dir of fs.readdirSync(dirname)) {
const dirPath = path.join(dirname, dir); const dirPath = path.join(dirname, dir);

View File

@@ -1,4 +1,4 @@
import { defineConfig } from 'vitest/config'; import { defineConfig, defaultExclude } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths'; import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({ export default defineConfig({
@@ -11,5 +11,6 @@ export default defineConfig({
reporter: ['junit'], reporter: ['junit'],
}, },
testTimeout: 10000, testTimeout: 10000,
exclude: ['website', ...defaultExclude],
}, },
}); });