mirror of
https://github.com/owncast/owncast.git
synced 2024-12-24 18:18:24 +03:00
20 lines
415 B
JavaScript
20 lines
415 B
JavaScript
export function setup() {
|
|
let windowErrorSpy;
|
|
|
|
Cypress.on('window:before:load', (win) => {
|
|
windowErrorSpy = cy.spy(win.console, 'error');
|
|
});
|
|
|
|
Cypress.on(
|
|
'uncaught:exception',
|
|
(err) => !err.message.includes('ResizeObserver loop limit exceeded')
|
|
);
|
|
|
|
describe('Listen for errors', () => {
|
|
afterEach(() => {
|
|
cy.wait(1000).then(() => {
|
|
expect(windowErrorSpy).to.not.be.called;
|
|
});
|
|
});
|
|
});
|
|
}
|