Buckets:
dieumercimvemba/mediastore / scripts /whatsapp-bridge /node_modules /pino /test /complex-objects.test.js
| const { test } = require('tap') | |
| const { sink, once } = require('./helper') | |
| const { PassThrough } = require('node:stream') | |
| const pino = require('../') | |
| test('Proxy and stream objects', async ({ equal }) => { | |
| const s = new PassThrough() | |
| s.resume() | |
| s.write('', () => {}) | |
| const obj = { s, p: new Proxy({}, { get () { throw new Error('kaboom') } }) } | |
| const stream = sink() | |
| const instance = pino(stream) | |
| instance.info({ obj }) | |
| const result = await once(stream, 'data') | |
| equal(result.obj, '[unable to serialize, circular reference is too complex to analyze]') | |
| }) | |
| test('Proxy and stream objects', async ({ equal }) => { | |
| const s = new PassThrough() | |
| s.resume() | |
| s.write('', () => {}) | |
| const obj = { s, p: new Proxy({}, { get () { throw new Error('kaboom') } }) } | |
| const stream = sink() | |
| const instance = pino(stream) | |
| instance.info(obj) | |
| const result = await once(stream, 'data') | |
| equal(result.p, '[unable to serialize, circular reference is too complex to analyze]') | |
| }) | |
Xet Storage Details
- Size:
- 1.01 kB
- Xet hash:
- e7fbed94344ff4247bcbd9c569d2cd1aefd379d7934c3937f8aaa804c1b084fe
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.