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

36 lines
1.0 KiB
Plaintext

'use strict'
/* eslint no-prototype-builtins: 0 */
const { test } = require('tap')
const { sink, once } = require('./helper')
test('pino.stdTimeFunctions.isoTimeNano returns RFC 3339 timestamps', async ({ equal }) => {
// Mock Date.now at module initialization time
const now = Date.now
Date.now = () => new Date('2025-08-01T15:03:45.000000000Z').getTime()
// Mock process.hrtime.bigint at module initialization time
const hrTimeBigint = process.hrtime.bigint
process.hrtime.bigint = () => 100000000000000n
const pino = require('../')
const opts = {
timestamp: pino.stdTimeFunctions.isoTimeNano
}
const stream = sink()
// Mock process.hrtime.bigint at invocation time, add 1 day to the timestamp
process.hrtime.bigint = () => 100000000000000n + 86400012345678n
const instance = pino(opts, stream)
instance.info('foobar')
const result = await once(stream, 'data')
equal(result.hasOwnProperty('time'), true)
equal(result.time, '2025-08-02T15:03:45.012345678Z')
Date.now = now
process.hrtime.bigint = hrTimeBigint
})