Files
klz-cables.com/.pnpm-store/v10/files/32/45fd7368546fd4d22c1b7cccf97364c34e9b4fb656a132fb7573a9dd3a70abf671de677d4e80c833f6348c2a46ac434c652d364954464b83b62d45cd95cc67
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

39 lines
695 B
Plaintext

'use strict'
const { test } = require('tap')
const { join } = require('path')
const ThreadStream = require('..')
const { file } = require('./helper')
const MAX = 1000
let str = ''
for (let i = 0; i < 10; i++) {
str += 'hello'
}
test('base', function (t) {
const dest = file()
const stream = new ThreadStream({
filename: join(__dirname, 'to-file.js'),
workerData: { dest }
})
let runs = 0
function benchThreadStream () {
if (++runs === 1000) {
stream.end()
return
}
for (let i = 0; i < MAX; i++) {
stream.write(str)
}
setImmediate(benchThreadStream)
}
benchThreadStream()
stream.on('finish', function () {
t.end()
})
})