hanldle uncaught exceptions in the tests
This commit is contained in:
@@ -6,6 +6,10 @@ import react from '@vitejs/plugin-react';
|
||||
// Ensure NODE_ENV is set to 'test' for all Vitest runs.
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
||||
});
|
||||
|
||||
/**
|
||||
* This is the main configuration file for Vite and the Vitest 'unit' test project.
|
||||
* When running `vitest`, it is orchestrated by `vitest.workspace.ts`, which
|
||||
|
||||
Reference in New Issue
Block a user