Skip to content

Commit

Permalink
Added extended tests for no unnecessary waiting to handle const situa…
Browse files Browse the repository at this point in the history
…tions.
  • Loading branch information
mastrzyz committed Nov 28, 2019
1 parent 722ad51 commit 0ef8935
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/lib/rules/no-unnecessary-waiting.js
Expand Up @@ -18,11 +18,14 @@ ruleTester.run('no-unnecessary-waiting', rule, {
{ code: 'cy.clock(5000)', parserOptions },
{ code: 'cy.scrollTo(0, 10)', parserOptions },
{ code: 'cy.tick(500)', parserOptions },

{ code: 'const someRequest="@someRequest"; cy.wait(someRequest)', parserOptions, errors },
],

invalid: [
{ code: 'cy.wait(0)', parserOptions, errors },
{ code: 'cy.wait(100)', parserOptions, errors },
{ code: 'cy.wait(5000)', parserOptions, errors },
{ code: 'const someNumber=500; cy.wait(someNumber)', parserOptions, errors },
],
})

0 comments on commit 0ef8935

Please sign in to comment.