sync mode on

This commit is contained in:
JotaChina committed 2025-10-26 16:43:01 -03:00
1 parent 1818932244
commit 1174b328e5
415 files changed
+44294 -1182

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
'use strict'
const { test } = require('tap')
const { join } = require('path')
const ThreadStream = require('..')
test('event propagate', t => {
const stream = new ThreadStream({
filename: join(__dirname, 'emit-event.js'),
workerData: {},
sync: true
})
t.on('end', () => stream.end())
stream.on('socketError', function (a, b, c, n, error) {
t.same(a, 'list')
t.same(b, 'of')
t.same(c, 'args')
t.same(n, 123)
t.same(error, new Error('unable to write data to the TCP socket'))
t.end()
})
stream.write('hello')
})