Skip to content

Commit

Permalink
fix: fixes matches performance issue, github#302
Browse files Browse the repository at this point in the history
  • Loading branch information
Sampo Kivistö authored and Jonathan Ginsburg committed May 13, 2022
1 parent 819d42d commit e964fa6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,10 @@ var KarmaSpecFilter = function (clientConfig, jasmineEnv) {
specs
}

this.specIdsToRun =
getSpecsToRun(window.location, clientConfig, jasmineEnv).map(getId)
this.specIdsToRun = new Set(getSpecsToRun(window.location, clientConfig, jasmineEnv).map(getId))

this.matches = function (spec) {
return this.specIdsToRun.indexOf(spec.id) !== -1
return this.specIdsToRun.has(spec.id)
}
}

Expand Down

0 comments on commit e964fa6

Please sign in to comment.