Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../uploads/../../../../instantly.picotech.app/homes/../../wa.picotech.app/public_html/node_modules/escape-html/.././object-assign/../pino/test/././transport
الملفات الموجودة في هذا الـ Path:
.
..
big.test.js
bundlers-support.test.js
caller.test.js
core.test.js
core.test.ts
core.transpiled.test.ts
module-link.test.js
pipeline.test.js
syncfalse.test.js
targets.test.js
مشاهدة ملف: syncfalse.test.js
'use strict'
const os = require('os')
const pino = require('../..')
const { join } = require('path')
const { test } = require('tap')
const { readFile } = require('fs').promises
const { watchFileCreated, file } = require('../helper')
const { pid } = process
const hostname = os.hostname()
test('thread-stream async flush', async ({ same }) => {
const destination = file()
const transport = pino.transport({
target: join(__dirname, '..', 'fixtures', 'to-file-transport.js'),
options: { destination }
})
const instance = pino(transport)
instance.info('hello')
instance.flush()
await watchFileCreated(destination)
const result = JSON.parse(await readFile(destination))
delete result.time
same(result, {
pid,
hostname,
level: 30,
msg: 'hello'
})
})