mirror of
https://github.com/dcarrillo/atalaya.git
synced 2026-04-18 02:24:05 +00:00
22
vitest.config.ts
Normal file
22
vitest.config.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
{
|
||||
name: 'mock-astro-ssr',
|
||||
resolveId(id: string) {
|
||||
// Allow vi.mock to intercept the Astro SSR build artifact that doesn't exist during tests
|
||||
if (id.includes('status-page/dist/_worker.js/index.js')) {
|
||||
return id;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
},
|
||||
],
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'node',
|
||||
include: ['src/**/*.test.ts'],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user