cypress-fail-on-console-error 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -68,17 +68,17 @@ Use `failOnConsoleError` functions `getConfig()` and `setConfig()` with your own
68
68
  const { getConfig, setConfig } = failOnConsoleError(config);
69
69
 
70
70
  Cypress.Commands.addAll({
71
- getExcludeMessages: () => cy.wrap(getConfig()),
71
+ getExcludeMessages: () => cy.wrap(getConfig().excludeMessages),
72
72
  setExcludeMessages: (excludeMessages: (string | RegExp)[]) =>
73
- setConfig({ ...getConfig(), excludeMessages );
73
+ setConfig({ ...getConfig(), excludeMessages})
74
+ });
74
75
  ```
75
76
 
76
77
  ```js
77
78
  describe('example test', () => {
78
- it('should set excluded messages', () => {
79
- cy.setExcludeMessages(['foo', 'bar']).then(() => {
80
- cy.visit('./cypress/fixtures/consoleError.html');
81
- });
79
+ it('should set exclude messages', () => {
80
+ cy.setExcludeMessages(['foo', 'bar']);
81
+ cy.visit('...');
82
82
  });
83
83
  });
84
84
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress-fail-on-console-error",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "fail cypress test on console error",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",