Skip to content

Commit 4ed8a87

Browse files
committed
fix: glob pattern test for Windows compatibility
1 parent 5ae5100 commit 4ed8a87

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/imageCompressor.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ describe('Image Compressor', function () {
143143
});
144144

145145
it('should batch compress using glob pattern', async () => {
146-
const globPattern = path.join(inputDir, '*.jpg');
146+
// Use forward slashes for glob patterns (works cross-platform)
147+
const globPattern = inputDir.replace(/\\/g, '/') + '/*.jpg';
147148
const batchOutputDir = path.join(outputDir, 'glob');
148149

149150
const result = await compressImages(

0 commit comments

Comments
 (0)