Package Exports
- cypress-fail-on-console-error
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cypress-fail-on-console-error) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cypress-fail-on-console-error
Installation
npm install cypress-fail-on-console-error --save-dev
Usage
cypress/support/index.ts
import failOnConsoleError from 'cypress-fail-on-console-error'
failOnConsoleError();
Config (optional)
use excludeMessages:string[]
to exclude console.error messages by regex from throwning assertionError.
Default value is undefined
.
use includeConsoleTypes:ConsoleType[]
to include console types.
Default value is [ConsoleType.ERROR]
.
const config = {
excludeMessages: ["foo", "^bar-regex.*$"],
includeConsoleTypes: [Console.ERROR, ConsoleType.WARN, ConsoleType.INFO],
};
failOnConsoleError(config);