download
raw
814 Bytes
'use strict'
const { test } = require('node:test')
const assert = require('node:assert')
const { join } = require('path')
const { file } = require('./helper')
const ThreadStream = require('..')
function basic (esVersion) {
test(`transpiled-ts-to-${esVersion}`, function () {
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.
assert.deepStrictEqual(stream.writableEnded, false)
stream.end()
assert.deepStrictEqual(stream.writableEnded, true)
})
}
basic('es5')
basic('es6')
basic('es2017')
basic('esnext')

Xet Storage Details

Size:
814 Bytes
·
Xet hash:
e9bbbbdbd2755895c0477e28a019d160595284010e6984b26651182903be71fe

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