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

Commit 4edff7e

Browse files
committed
fix(tests): set up correct file mode on Windows
1 parent 1471593 commit 4edff7e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/utils.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import test from 'tape';
22
import nock from 'nock';
33
import toReadableStream from 'to-readable-stream';
44
import { stat as statCallback, unlinkSync } from 'node:fs';
5+
import { platform } from 'node:os';
56
import { promisify } from 'node:util';
67
import { areObjectsEqual, downloadToFile } from '../src/utils';
78

@@ -47,8 +48,8 @@ echo "hello"
4748
const stats = await stat(filePath);
4849
t.equal(
4950
stats.mode,
50-
33261,
51-
'downloaded file should exist and have executable permissions.'
51+
platform() === 'win32' ? 33206 : 33261,
52+
'downloaded file should exist and have executable permissions on valid platforms.'
5253
);
5354
unlinkSync(filePath);
5455
nock.cleanAll();

0 commit comments

Comments
 (0)