summaryrefslogtreecommitdiff
path: root/test/sequential
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-01-01 20:51:06 -0800
committerRich Trott <rtrott@gmail.com>2019-01-03 22:58:26 -0800
commit7d453ff21294bc9dcf7c9a61b1a07c3a15a021ce (patch)
treed1c2397811a7eba77c52559665019060a984aa68 /test/sequential
parent1f1a373df0121a9e4a2887f69862169b2f4ed2fd (diff)
downloadandroid-node-v8-7d453ff21294bc9dcf7c9a61b1a07c3a15a021ce.tar.gz
android-node-v8-7d453ff21294bc9dcf7c9a61b1a07c3a15a021ce.tar.bz2
android-node-v8-7d453ff21294bc9dcf7c9a61b1a07c3a15a021ce.zip
test: replace internals with public API
Remove instances where `--expose-internals` is used to gain access to buffer.kStringMaxLength. The property is availalble without a flag. It is undocumented but the same as the documented `buffer.constants.MAX_STRING_LENGTH` so use that. (We even have a test that confirms that they are the same value.) PR-URL: https://github.com/nodejs/node/pull/25309 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/sequential')
-rw-r--r--test/sequential/test-fs-readfile-tostring-fail.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/sequential/test-fs-readfile-tostring-fail.js b/test/sequential/test-fs-readfile-tostring-fail.js
index da8f3930f6..9a443fc71b 100644
--- a/test/sequential/test-fs-readfile-tostring-fail.js
+++ b/test/sequential/test-fs-readfile-tostring-fail.js
@@ -1,8 +1,6 @@
'use strict';
-// Flags: --expose-internals
const common = require('../common');
-const { internalBinding } = require('internal/test/binding');
if (!common.enoughTestMem)
common.skip('intensive toString tests due to memory confinements');
@@ -11,7 +9,7 @@ const assert = require('assert');
const fs = require('fs');
const path = require('path');
const cp = require('child_process');
-const kStringMaxLength = internalBinding('buffer').kStringMaxLength;
+const kStringMaxLength = require('buffer').constants.MAX_STRING_LENGTH;
if (common.isAIX && (Number(cp.execSync('ulimit -f')) * 512) < kStringMaxLength)
common.skip('intensive toString tests due to file size confinements');