Projektstart

This commit is contained in:
2026-01-22 15:49:12 +01:00
parent 7212eb6f7a
commit 57e5f652f8
10637 changed files with 2598792 additions and 64 deletions

33
backend/node_modules/thread-stream/test/ts.test.ts generated vendored Normal file
View File

@@ -0,0 +1,33 @@
import { test } from 'tap'
import { readFile } from 'fs'
import ThreadStream from '../index.js'
import { join } from 'path'
import { file } from './helper.js'
test('typescript module', function (t) {
t.plan(5)
const dest = file()
const stream = new ThreadStream({
filename: join(__dirname, 'ts', 'to-file.ts'),
workerData: { dest },
sync: true
})
stream.on('finish', () => {
readFile(dest, 'utf8', (err, data) => {
t.error(err)
t.equal(data, 'hello world\nsomething else\n')
})
})
stream.on('close', () => {
t.pass('close emitted')
})
t.ok(stream.write('hello world\n'))
t.ok(stream.write('something else\n'))
stream.end()
})