diff options
Diffstat (limited to 'packages/core/src/utils/gitIgnoreParser.test.ts')
| -rw-r--r-- | packages/core/src/utils/gitIgnoreParser.test.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/core/src/utils/gitIgnoreParser.test.ts b/packages/core/src/utils/gitIgnoreParser.test.ts index f58d50be..d94a7bfa 100644 --- a/packages/core/src/utils/gitIgnoreParser.test.ts +++ b/packages/core/src/utils/gitIgnoreParser.test.ts @@ -161,6 +161,21 @@ src/*.tmp expect(parser.isIgnored('node_modules\\package')).toBe(true); expect(parser.isIgnored('src\\temp.tmp')).toBe(true); }); + + it('should handle root path "/" without throwing error', () => { + expect(() => parser.isIgnored('/')).not.toThrow(); + expect(parser.isIgnored('/')).toBe(false); + }); + + it('should handle absolute-like paths without throwing error', () => { + expect(() => parser.isIgnored('/some/path')).not.toThrow(); + expect(parser.isIgnored('/some/path')).toBe(false); + }); + + it('should handle paths that start with forward slash', () => { + expect(() => parser.isIgnored('/node_modules')).not.toThrow(); + expect(parser.isIgnored('/node_modules')).toBe(false); + }); }); describe('getIgnoredPatterns', () => { |
