mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
19 lines
692 B
TypeScript
19 lines
692 B
TypeScript
import "./commands";
|
|
|
|
// The API's user seeders are disabled in app code — the SQL fixture creates
|
|
// the staff + demo test users instead. Idempotent, runs before each spec file.
|
|
before(() => {
|
|
cy.task("db:seedUsers");
|
|
});
|
|
|
|
// Third-party noise (PostHog, Google Maps, socket.io reconnects) can throw
|
|
// uncaught exceptions that are irrelevant to the assertion under test. App
|
|
// errors still fail tests via failed assertions / failed intercepts.
|
|
Cypress.on("uncaught:exception", (err) => {
|
|
const ignorable = [/posthog/i, /google/i, /websocket/i, /socket\.io/i, /ResizeObserver/i];
|
|
if (ignorable.some((pattern) => pattern.test(err.message))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|