Files
klz-cables.com/.pnpm-store/v10/files/82/28bcd4107a2274f7e361c6dae2fe668ec6fe8a0bfc8fac8f9e4f36377380b7ed242359422f1cf44d122a6da81c63771e89443964d89ff0556c4acd2854c96a
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

42 lines
824 B
Plaintext

'use strict'
const t = require('tap')
if (process.env.CI) {
t.skip('skip on CI')
process.exit(0)
}
const { join } = require('path')
const { file } = require('./helper')
const { createReadStream } = require('fs')
const ThreadStream = require('..')
const buffer = require('buffer')
const MAX_STRING = buffer.constants.MAX_STRING_LENGTH
t.plan(1)
const dest = file()
const stream = new ThreadStream({
filename: join(__dirname, 'to-file.js'),
workerData: { dest },
sync: false
})
stream.on('close', async () => {
t.comment('close emitted')
let buf
for await (const chunk of createReadStream(dest)) {
buf = chunk
}
t.equal('asd', buf.toString().slice(-3))
})
stream.on('ready', () => {
t.comment('open emitted')
stream.write('a'.repeat(MAX_STRING - 2))
stream.write('asd')
stream.end()
})