Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
fixed skip already excludes selectors
  • Loading branch information
JPeer264 committed Nov 29, 2016
1 parent aba505f commit d68e426
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/options/selectorLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,20 @@ class SelectorLibrary {
if (!toExclude) return;

if (typeof toExclude === 'string') {
if (this.contains.call(this.excludes, toExclude)) {
return
}

(this.excludes).push(toExclude);

return;
}

for (let e of toExclude) {
if (this.contains.call(this.excludes, e)) {
continue;
}

(this.excludes).push(e);
}
} // /setExclude
Expand Down
2 changes: 1 addition & 1 deletion test/selectorLibrary.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('rcs selector library', () => {
});
});

describe.only('setExclude', () => {
describe('setExclude', () => {
beforeEach(() => {
rcs.selectorLibrary.excludes = []
});
Expand Down

0 comments on commit d68e426

Please sign in to comment.