Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit d0129ec

Browse files
committed
Fix tests on Windows where chmod is not working like unix
1 parent bba24d7 commit d0129ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ test('strip + map', function (t) {
164164
})
165165

166166
test('map + dir + permissions', function (t) {
167-
t.plan(2)
167+
t.plan(win32 ? 1 : 2) // skip chmod test, it's not working like unix
168168

169169
var a = path.join(__dirname, 'fixtures', 'b')
170170
var b = path.join(__dirname, 'fixtures', 'copy', 'a-perms')
@@ -184,7 +184,9 @@ test('map + dir + permissions', function (t) {
184184
var files = fs.readdirSync(b).sort()
185185
var stat = fs.statSync(path.join(b, 'a'))
186186
t.same(files.length, 1)
187-
t.same(stat.mode & parseInt(777, 8), parseInt(700, 8))
187+
if (!win32) {
188+
t.same(stat.mode & parseInt(777, 8), parseInt(700, 8))
189+
}
188190
})
189191
})
190192

0 commit comments

Comments
 (0)