refactor: simplify arrow functions (#12057)
This commit is contained in:

committed by
Chuck Jazdzewski

parent
a63359689f
commit
50c37d45dc
@ -169,7 +169,7 @@ export class ChromeDriverExtension extends WebDriverExtension {
|
||||
eventCategories: string[], eventName: string, expectedCategories: string[],
|
||||
expectedName: string = null): boolean {
|
||||
var hasCategories = expectedCategories.reduce(
|
||||
(value, cat) => { return value && eventCategories.indexOf(cat) !== -1; }, true);
|
||||
(value, cat) => value && eventCategories.indexOf(cat) !== -1, true);
|
||||
return !expectedName ? hasCategories : hasCategories && eventName === expectedName;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user