Skip to content

Commit 09cb231

Browse files
committed
test(fs): unskip glob ignore pattern tests
The glob matcher pattern complexity issues have been resolved. Both tests now pass successfully: 1. isDirEmptySync with ignore patterns - tests that .git directories are properly ignored when checking if a directory is empty 2. readDirNames with ignore patterns and includeEmpty: false - tests that directories containing only ignored files are excluded Test results: - isDirEmptySync ignore test: passing - readDirNames ignore + includeEmpty test: passing All 107 tests in test/fs.test.ts now run without skips.
1 parent a8697b2 commit 09cb231

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

test/fs.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,7 @@ describe('fs', () => {
297297
expect(result).toBe(false)
298298
})
299299

300-
it.skip('should ignore files matching ignore patterns', async () => {
301-
// Note: This test is skipped due to glob matcher pattern complexity.
302-
// The ignore patterns work but require specific glob patterns that
303-
// are tested indirectly through other functions.
300+
it('should ignore files matching ignore patterns', async () => {
304301
await runWithTempDir(async tmpDir => {
305302
const gitDir = path.join(tmpDir, '.git')
306303
await fs.mkdir(gitDir)
@@ -435,10 +432,7 @@ describe('fs', () => {
435432
expect(result).toEqual([])
436433
})
437434

438-
it.skip('should use ignore patterns with includeEmpty false', async () => {
439-
// Note: This test is skipped due to glob matcher pattern complexity with isDirEmptySync.
440-
// The ignore patterns require **/ prefix for picomatch to match correctly.
441-
// This functionality needs to be refactored to handle both simple patterns and glob patterns.
435+
it('should use ignore patterns with includeEmpty false', async () => {
442436
await runWithTempDir(async tmpDir => {
443437
const emptyDir = path.join(tmpDir, 'empty-dir')
444438
await fs.mkdir(emptyDir)

0 commit comments

Comments
 (0)