Skip to content

Commit

Permalink
fix: ensure that we are not matching dot dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Mar 21, 2023
1 parent fe845ec commit a4cee95
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/testExpression.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ it('[dirname] evaluates as true if a given file has a matching parent directory
it('[dirname] evaluates as false if a given file does not have a matching parent directory (bar)', () => {
expect(testExpression(['dirname', 'bar'], '/foo/bar')).toBe(false);
expect(testExpression(['dirname', '/bar'], '/foo/bar/baz')).toBe(false);
expect(testExpression(['dirname', 'foo'], '/.foo/bar')).toBe(false);
});

it('[idirname] evaluates as true if a given file has a matching parent directory (foo)', () => {
Expand Down

0 comments on commit a4cee95

Please sign in to comment.