dieumercimvemba's picture
download
raw
560 Bytes
'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')
})

Xet Storage Details

Size:
560 Bytes
·
Xet hash:
efa48c04de02f7a341f3678d1b9c8b69b44bdfdf66781423627a955b3a1b5426

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.