Skip to content

Commit ad396fb

Browse files
authored
Apply suggestions from code review
1 parent 84274f2 commit ad396fb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/rules/no-unnecessary-waiting.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ function isIdentifierNumberConstArgument (node, scope) {
6060
const resolvedIdentifier = scope.references.find((ref) => ref.identifier === identifier).resolved
6161
const definition = resolvedIdentifier.defs[0]
6262
const isVariable = definition.type === 'Variable'
63-
const isImportBinding = definition.type === 'ImportBinding'
6463

6564
// const amount = 1000 or const amount = '@alias'
6665
// cy.wait(amount)
@@ -73,9 +72,7 @@ function isIdentifierNumberConstArgument (node, scope) {
7372
// import { WAIT } from './constants'
7473
// cy.wait(WAIT)
7574
// we don't know if WAIT is a number or alias '@someRequest', so don't fail
76-
if (isImportBinding) {
77-
return false
78-
}
75+
if (definition.type === 'ImportBinding') return false
7976

8077
const param = definition.node.params[definition.index]
8178

0 commit comments

Comments
 (0)