mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-24 00:19:21 +00:00
chore: fail tests that contain unhandled errors (#724)
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
import { expect, test as base } from '@playwright/test';
|
||||||
|
|
||||||
|
// fail tests which contain errors
|
||||||
|
export const test = base.extend({
|
||||||
|
page: async ({ page }, use) => {
|
||||||
|
const messages = [];
|
||||||
|
page.on('pageerror', (exception) => {
|
||||||
|
console.log(`Uncaught exception: "${exception.message}"`);
|
||||||
|
messages.push(exception);
|
||||||
|
});
|
||||||
|
await use(page);
|
||||||
|
expect(messages).toEqual([]);
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user