Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4475655
test_promise_inspect_long.cjs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
649 B
Referenced Files
None
Subscribers
None
test_promise_inspect_long.cjs
View Options
const { inspect } = require('node:util');
function assert(cond, msg) {
if (!cond) throw new Error(msg);
}
const longValue = '1234567890123456789012345678901234567890123456789012345678901234567890';
const promise = Promise.resolve({ a: longValue, b: 2 });
const rendered = inspect(promise);
assert(rendered.includes(`a: '${longValue}'`), `expected full promise payload in inspect output, got: ${rendered}`);
assert(rendered.includes('b: 2'), `expected secondary property in inspect output, got: ${rendered}`);
assert(rendered.includes('Symbol(async_id):'), `expected promise metadata in inspect output, got: ${rendered}`);
console.log('PASS');
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, May 2, 10:17 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
544215
Default Alt Text
test_promise_inspect_long.cjs (649 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment