Files
klz-cables.com/.pnpm-store/v10/files/1d/083b6b7237121aeecffa8203a778fdb981d3b623363def2b9e7359ec0c80f834b73fee5226474ec7beeaa0bb910f0317449581f243c64d06cdf8335d7afd32
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

45 lines
999 B
Plaintext

'use strict'
const { test } = require('tap')
const { join } = require('node:path')
const proxyquire = require('proxyquire')
const Writable = require('node:stream').Writable
const pino = require('../../pino')
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()
})
test('pino.transport with syntax error', ({ same, teardown, plan }) => {
plan(1)
const transport = pino.transport({
targets: [{
target: join(__dirname, '..', 'fixtures', 'syntax-error-esm.mjs')
}]
})
teardown(transport.end.bind(transport))
transport.on('error', (err) => {
same(err, new SyntaxError('Unexpected end of input'))
})
})