Porting tests over to vitest

This commit is contained in:
Dolan Miu
2023-06-05 00:33:43 +01:00
parent a89919397d
commit e69b063687
256 changed files with 1557 additions and 612 deletions

View File

@ -51,15 +51,12 @@ export class Packer {
public static toStream(file: File, prettify?: boolean | PrettifyType): Stream {
const zip = this.compiler.compile(file, prettify === true ? PrettifyType.WITH_2_BLANKS : prettify === false ? undefined : prettify);
const stream = new Stream();
// eslint-disable-next-line functional/immutable-data
stream.pipe = (dest) => {
zip.then((z) => {
dest.write(z);
});
return dest;
};
zip.then((z) => {
stream.emit("data", z);
stream.emit("end");
});
return stream;
}