@lifeomic/test-tool-utils
v5.2.1
Published
[![npm](https://img.shields.io/npm/v/@lifeomic/test-tool-utils.svg)](https://www.npmjs.com/package/@lifeomic/test-tool-utils) [![Build Status](https://github.com/lifeomic/test-tools/actions/workflows/release.yaml/badge.svg)](https://github.com/lifeomic/te
Downloads
1,630
Readme
@lifeomic/test-tool-utils
logging
Exposes a debug instance for the named library
export interface Logger {
info: Debugger;
error: Debugger;
warn: Debugger;
debug: Debugger;
child(name: string): Logger;
}
import { logging } from '@lifeomic/test-tool-utils';
const logger = logging.getLogger('my-lib');
writeBuffer
An array backed buffer for streams. Especially useful for handling Docker streams.
import { writeBuffer } from '@lifeomic/test-tool-utils';
...
const stderr = new writeBuffer.WriteBuffer();
const stdout = new writeBuffer.WriteBuffer();
container.modem.demuxStream(stream, stdout, stderr);
...
console.info(stdout.toString('utf-8'));
console.error(stderr.toString('utf-8'));