We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e66137 commit accd861Copy full SHA for accd861
front/tests/logging-fixture.ts
@@ -16,6 +16,11 @@ const testWithLogging = baseTest.extend<{ page: Page }>({
16
// Log before the test starts
17
logger.info(`START: '${testInfo.title}' | Browser: ${browserName}`);
18
19
+ // Handle uncaught exceptions
20
+ page.on('pageerror', (exception) => {
21
+ throw new Error(`Test failed due to uncaught exception: "${exception}"`);
22
+ });
23
+
24
// Run the actual test
25
await use(page);
26
0 commit comments