This commit is contained in:
nik
2025-10-03 22:27:28 +03:00
parent 829fad0e17
commit 871cf7e792
16520 changed files with 2967597 additions and 3 deletions

28
node_modules/pino/test/transport/targets.test.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict'
const { test } = require('tap')
const proxyquire = require('proxyquire')
const Writable = require('stream').Writable
test('file-target mocked', async function ({ equal, same, plan, pass }) {
plan(1)
let ret
const fileTarget = proxyquire('../../file', {
'./pino': {
destination (opts) {
same(opts, { dest: 1, sync: false })
ret = new Writable()
ret.fd = opts.dest
process.nextTick(() => {
ret.emit('ready')
})
return ret
}
}
})
await fileTarget()
})