Files
klz-cables.com/.pnpm-store/v10/files/d3/c547ee4712ffdd86188b05eefd0864efb770e5dd2898da66ae7147d8c4465218644976a9d4a71fec78407190903bded96d0bb910916e443680c3a16d8a5e11
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

56 lines
1.2 KiB
Plaintext

'use strict'
const { test } = require('tap')
const { sink, once } = require('./helper')
const pino = require('../')
const level = 50
const name = 'error'
test('default merge strategy', async ({ ok, same }) => {
const stream = sink()
const instance = pino({
base: {},
mixin () {
return { tag: 'k8s' }
}
}, stream)
instance.level = name
instance[name]({
tag: 'local'
}, 'test')
const result = await once(stream, 'data')
ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()')
delete result.time
same(result, {
level,
msg: 'test',
tag: 'local'
})
})
test('custom merge strategy with mixin priority', async ({ ok, same }) => {
const stream = sink()
const instance = pino({
base: {},
mixin () {
return { tag: 'k8s' }
},
mixinMergeStrategy (mergeObject, mixinObject) {
return Object.assign(mergeObject, mixinObject)
}
}, stream)
instance.level = name
instance[name]({
tag: 'local'
}, 'test')
const result = await once(stream, 'data')
ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()')
delete result.time
same(result, {
level,
msg: 'test',
tag: 'k8s'
})
})