Skip to content

Commit

Permalink
fix: Add missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Jan 21, 2022
1 parent 38018b3 commit 319a114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gitignore-to-minimatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function gitignoreToMinimatch(pattern) {
return pattern;
}

// strip off negation to make life easier
const not = pattern.startsWith("!");
const patternToTest = not ? pattern.slice(1) : pattern;
let result = patternToTest;
Expand Down
1 change: 1 addition & 0 deletions tests/gitignore-to-minimatch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { expect } from "chai";
describe("gitignoreToMinimatch", () => {

const patterns = new Map([
["", ""],
["*", "**/*"],
["/foo", "foo"],
["foo", "**/foo"],
Expand Down

0 comments on commit 319a114

Please sign in to comment.