mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
0eb2b727f6
`0` is already a special value returned from `uv_get_constrained_memory` representing unknown or no constraint. Make `process.constrainedMemory()` constantly return a number instead to avoid polymorphic return type. PR-URL: https://github.com/nodejs/node/pull/52039 Reviewed-By: theanarkh <theratliter@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
7 lines
182 B
JavaScript
7 lines
182 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const constrainedMemory = process.constrainedMemory();
|
|
assert.strictEqual(typeof constrainedMemory, 'number');
|