/
erioxis
/
web-nodejs
Обзор
Документация
Войти
/
erioxis
/
web-nodejs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
backend/node_modules/thread-stream/test/transpiled.test.js
30 строк
754 B
erioxis
lab11fix
15 дек 2025, 23:21
15 дек 2025, 23:21
70dc7ba
Код
Авторство
О чём код?
'use strict' const { test } = require('tap') const { join } = require('path') const { file } = require('./helper') const ThreadStream = require('..') function basic (esVersion) { test(`transpiled-ts-to-${esVersion}`, function (t) { t.plan(2) const dest = file() const stream = new ThreadStream({ filename: join(__dirname, 'ts', `to-file.${esVersion}.cjs`), workerData: { dest }, sync: true }) // There are arbitrary checks, the important aspect of this test is to ensure // that we can properly load the transpiled file into our worker thread. t.same(stream.writableEnded, false) stream.end() t.same(stream.writableEnded, true) }) } basic('es5') basic('es6') basic('es2017') basic('esnext')