Home > @rushstack/terminal > MockWritable
MockWritable class
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
A TerminalWritable subclass for use by unit tests.
Signature:
export declare class MockWritable extends TerminalWritable
Extends: TerminalWritable
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(options) | Constructs a new instance of the (Inherited from TerminalWritable) |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
chunks | readonly | ITerminalChunk[] | (BETA) |
isOpen | readonly | boolean | This property is initially (Inherited from TerminalWritable) |
preventAutoclose | readonly | boolean | (Inherited from TerminalWritable) |
Methods
Method | Modifiers | Description |
---|---|---|
close() | Calling this method flushes any remaining outputs and permanently transitions the (Inherited from TerminalWritable) | |
getAllOutput() | (BETA) | |
getFormattedChunks() | (BETA) | |
onClose() | protected | Subclasses can override this empty method to perform additional operations such as closing a file handle. (Inherited from TerminalWritable) |
onWriteChunk(chunk) | protected | (BETA) |
reset() | (BETA) | |
writeChunk(chunk) | Upstream objects call this method to provide inputs to this object. (Inherited from TerminalWritable) |