Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: set specFilter only when needed (#24)
* fix: set specFilter only when needed

* syntax error
  • Loading branch information
saschanaz authored and dfederm committed Apr 23, 2019
1 parent baa99b5 commit 828a932
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/lib/adapter.js
Expand Up @@ -63,13 +63,16 @@
/**
* Filter which specs will be run by matching the start of the full name against the `spec` query param.
*/
var specFilter = new jasmine.HtmlSpecFilter({
filterString: function () { return queryString.getParam("spec"); }
});

config.specFilter = function (spec) {
return specFilter.matches(spec.getFullName());
};
var specFilter;
if (!config.specFilter || queryString.getParam("spec")) {
specFilter = new jasmine.HtmlSpecFilter({
filterString: function () { return queryString.getParam("spec"); }
});

config.specFilter = function (spec) {
return specFilter.matches(spec.getFullName());
};
}

env.configure(config);

Expand Down

0 comments on commit 828a932

Please sign in to comment.