mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
fix process-constrained-memory.test.js
This commit is contained in:
@@ -2334,7 +2334,7 @@ JSC_DEFINE_HOST_FUNCTION(Process_functionConstrainedMemory,
|
||||
#if OS(LINUX) || OS(FREEBSD)
|
||||
return JSValue::encode(jsDoubleNumber(static_cast<double>(WTF::ramSize())));
|
||||
#else
|
||||
return JSValue::encode(jsUndefined());
|
||||
return JSValue::encode(jsNumber(0)); // TODO:
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
//#FILE: test-process-constrained-memory.js
|
||||
//#SHA1: 6c09d5733a7ac49f00b4923125a023c670423adf
|
||||
//-----------------
|
||||
"use strict";
|
||||
|
||||
test("process.constrainedMemory()", () => {
|
||||
const constrainedMemory = process.constrainedMemory();
|
||||
expect(typeof constrainedMemory).toBe("number");
|
||||
});
|
||||
|
||||
//<#END_FILE: test-process-constrained-memory.js
|
||||
Reference in New Issue
Block a user