Skip to content

Class: MockIoFile ​

Mock generic io file.

Constructors ​

Constructor ​

ts
new MockIoFile(
   path: string, 
   mode: string, 
   isOpen?: boolean): MockIoFile;

Parameters ​

ParameterTypeDefault value
pathstringundefined
modestringundefined
isOpenbooleantrue

Returns ​

MockIoFile

Methods ​

mock() ​

ts
static mock(
   path: string, 
   mode: string, 
   isOpen?: boolean): LuaFile;

Parameters ​

ParameterTypeDefault value
pathstringundefined
modestringundefined
isOpenbooleantrue

Returns ​

LuaFile

Properties ​

asMock ​

ts
asMock: Mock<LuaFile, [], any>;

close ​

ts
close: Mock<void, [], any>;

content ​

ts
content: Nillable<string> = "";

isOpen ​

ts
isOpen: boolean;

mode ​

ts
mode: string;

path ​

ts
path: string;

read ​

ts
read: Mock<Nillable<string>, [], any>;

setvbuf ​

ts
setvbuf: Mock<void, [], any>;

write ​

ts
write: Mock<void, [string], any>;