brand new unit tests finally
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 2m11s
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 2m11s
This commit is contained in:
@@ -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 () => {
|
||||||
|
|||||||
@@ -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: [
|
||||||
|
|||||||
@@ -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,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user