eslint-plugin-noredink-cypress
Advanced tools
Comparing version 0.0.2 to 0.1.0
@@ -108,3 +108,3 @@ /** | ||
const previousCypressCommand = getPreviousCypressCommand(node) | ||
return assertionCommands.indexOf(previousCypressCommand) >= 0 | ||
return assertionCommands.indexOf(previousCypressCommand) >= 0 || previousCypressCommand === false | ||
} |
{ | ||
"name": "eslint-plugin-noredink-cypress", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "An ESLint Plugin with rules used by NoRedInk in our Cypress test files", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -48,2 +48,2 @@ # eslint-plugin-noredink-cypress | ||
|:--------|:------------| | ||
| assertion-before-percySnapshot | Ensure [cy.percySnapshot](https://docs.percy.io/docs/cypress) is always preceded by an assertion | | ||
| assertion-before-percySnapshot | Ensure [cy.percySnapshot](https://docs.percy.io/docs/cypress) is always preceded by an assertion or a call to function (which may of may not contain an assertion, that isn't checked) | |
@@ -22,2 +22,3 @@ 'use strict' | ||
{ code: 'cy.get(".some-element").contains("Text"); cy.percySnapshot();', parserOptions }, | ||
{ code: 'a(); cy.percySnapshot();', parserOptions }, | ||
], | ||
@@ -35,3 +36,4 @@ | ||
{ code: 'cy.get(".some-element"); const a = () => { cy.percySnapshot(); }', parserOptions, errors }, | ||
{ code: 'const a = 3; cy.percySnapshot();', parserOptions, errors }, | ||
], | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7498
137