From f45e14a5eba063e7d5a1c2a65e9617872f3c94d6 Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Sun, 5 Jul 2020 19:22:51 +0200 Subject: [PATCH] added test for issue #14 --- test/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/index.js b/test/index.js index 11c09f7..fb5b7c1 100644 --- a/test/index.js +++ b/test/index.js @@ -140,4 +140,12 @@ assert.strictEqual(gitignore.accepts('/ajax/libs/punycode/2.0.0'), true); //outp assert.strictEqual(gitignore.accepts('/ajax/libs/typescript/2.0.6-insiders.20161014'), true); //output false }); }); + + describe('issue #12', function () { + it('should not fail test A', function () { + var gitignore = parser.compile('node_modules'); + assert.strictEqual(gitignore.rejects('packages/my-package/node-modules'), true); + assert.strictEqual(gitignore.accepts('packages/my-package/node-modules'), false); + }); + }); });