brand new unit tests finally
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 2m11s

This commit is contained in:
2025-11-27 22:42:24 -08:00
parent 53aa53a75f
commit dc3ff571e0
3 changed files with 4 additions and 1 deletions

View File

@@ -65,7 +65,8 @@ describe('pdfConverter', () => {
}); });
afterEach(() => { afterEach(() => {
// No cleanup needed here; vi.mock and vi.stubGlobal are automatically handled between files. // Restore the global mocks to prevent them from leaking into other test files.
vi.unstubAllGlobals();
}); });
it('should convert a multi-page PDF to image files', async () => { it('should convert a multi-page PDF to image files', async () => {

View File

@@ -54,6 +54,7 @@ export default defineConfig({
reporter: ['html', 'json'], reporter: ['html', 'json'],
reportsDirectory: './.coverage/unit', reportsDirectory: './.coverage/unit',
clean: true, clean: true,
reportOnFailure: true, // This ensures the report generates even if tests fail
include: ['src/**/*.{ts,tsx}'], include: ['src/**/*.{ts,tsx}'],
// Refine exclusions to be more comprehensive // Refine exclusions to be more comprehensive
exclude: [ exclude: [

View File

@@ -49,6 +49,7 @@ const finalConfig = mergeConfig(baseViteConfig, defineConfig({
// We remove 'text' here. The final text report will be generated by `nyc` after merging. // We remove 'text' here. The final text report will be generated by `nyc` after merging.
reporter: ['html', 'json-summary', 'json'], reporter: ['html', 'json-summary', 'json'],
reportsDirectory: '.coverage/integration', reportsDirectory: '.coverage/integration',
reportOnFailure: true, // This ensures the report generates even if tests fail
clean: true, clean: true,
}, },
} }