We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test-fs-readfile-tostring-fail
1 parent df31c81 commit 684dd9dCopy full SHA for 684dd9d
1 file changed
test/pummel/test-fs-readfile-tostring-fail.js
@@ -9,13 +9,15 @@ const assert = require('assert');
9
const fs = require('fs');
10
const cp = require('child_process');
11
const kStringMaxLength = require('buffer').constants.MAX_STRING_LENGTH;
12
+const size = Math.floor(kStringMaxLength / 200);
13
+
14
if (common.isAIX && (Number(cp.execSync('ulimit -f')) * 512) < kStringMaxLength)
15
common.skip('intensive toString tests due to file size confinements');
16
17
const tmpdir = require('../common/tmpdir');
18
tmpdir.refresh();
19
-if (!tmpdir.hasEnoughSpace(kStringMaxLength)) {
20
+if (!tmpdir.hasEnoughSpace(kStringMaxLength + size)) {
21
common.skip(`Not enough space in ${tmpdir.path}`);
22
}
23
@@ -26,7 +28,6 @@ const stream = fs.createWriteStream(file, {
26
28
27
29
stream.on('error', (err) => { throw err; });
30
-const size = kStringMaxLength / 200;
31
const a = Buffer.alloc(size, 'a');
32
let expectedSize = 0;
33
0 commit comments