Skip to content

Commit c3a2181

Browse files
Clarify elementCount arguments
Before this commit the term `selector` was used for two separate arguments in two separate scopes. Rename the function passed to the browser so the developer understands that these are two arguments/two scopes/not the same value.
1 parent 84a844a commit c3a2181

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

template/test/e2e/custom-assertions/elementCount.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ exports.assertion = function (selector, count) {
1818
}
1919
this.command = function (cb) {
2020
var self = this{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
21-
return this.api.execute(function (selector) {
22-
return document.querySelectorAll(selector).length{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
21+
return this.api.execute(function (selectorToCount) {
22+
return document.querySelectorAll(selectorToCount).length{{#if_eq lintConfig "airbnb"}};{{/if_eq}}
2323
}, [selector], function (res) {
2424
cb.call(self, res){{#if_eq lintConfig "airbnb"}};{{/if_eq}}
2525
}){{#if_eq lintConfig "airbnb"}};{{/if_eq}}

0 commit comments

Comments
 (0)