web-transform.js
This file
Path
test/stdio/web-transform.js
24 lines · 916 bytes · JavaScript
Last changed by
TweaksSindre Sorhusbefore adoption698a1b8
History of this fileTake it
The walk stopped after 200 commits: lines older than 08eb743 point at it.
TweaksSindre Sorhusbefore adoption698a1b8
line 1why, one step back1import assert from 'node:assert/strict';Upgrade `tsd` and `c8` (#982)ehmickybefore adoption08eb743
lines 2–3why, one step back2import {promisify} from 'node:util';3import {gunzip} from 'node:zlib';TweaksSindre Sorhusbefore adoption698a1b8
line 4why, one step back4import test from 'node:test';Upgrade `tsd` and `c8` (#982)ehmickybefore adoption08eb743
lines 5–10why, one step back5import {execa} from '../../index.js';6import {setFixtureDirectory} from '../helpers/fixtures-directory.js';7import {foobarString, foobarUtf16Uint8Array, foobarUint8Array} from '../helpers/input.js';89setFixtureDirectory();10TweaksSindre Sorhusbefore adoption698a1b8
line 11why, one step back11test('Can use CompressionStream()', async () => {Upgrade `tsd` and `c8` (#982)ehmickybefore adoption08eb743
lines 12–13why, one step back12 const {stdout} = await execa('noop-fd.js', ['1', foobarString], {stdout: new CompressionStream('gzip'), encoding: 'buffer'});13 const decompressedStdout = await promisify(gunzip)(stdout);TweaksSindre Sorhusbefore adoption698a1b8
line 14why, one step back14 assert.equal(decompressedStdout.toString(), foobarString);Upgrade `tsd` and `c8` (#982)ehmickybefore adoption08eb743
lines 15–16why, one step back15});16TweaksSindre Sorhusbefore adoption698a1b8
line 17why, one step back17test('Can use TextDecoderStream()', async () => {Upgrade `tsd` and `c8` (#982)ehmickybefore adoption08eb743
lines 18–22why, one step back18 const {stdout} = await execa('stdin.js', {19 input: foobarUtf16Uint8Array,20 stdout: new TextDecoderStream('utf-16le'),21 encoding: 'buffer',22 });TweaksSindre Sorhusbefore adoption698a1b8
line 23why, one step back23 assert.deepEqual(stdout, foobarUint8Array);Upgrade `tsd` and `c8` (#982)ehmickybefore adoption08eb743
line 24why, one step back24});