@iotize/tap-scripts
Version:
IoTize Tap scripts
23 lines (22 loc) • 808 B
TypeScript
import { TapResponse } from '@iotize/tap';
import { Tap } from '@iotize/tap';
import { TestRunnerIO } from './definitions';
export interface TestRunnerContextInterface {
lastLwm2mResponse?: TapResponse<Uint8Array>;
lastLwm2mGetResponse?: TapResponse<any>;
device: Tap;
io: TestRunnerIO;
store<T = any>(key: string): T;
store<T>(key: string, value: T): void;
/**
* Set next instruction index to call.
* If this method is not called, the runner must execute instruction at current index + 1
* @param index
*/
setNextIndex(index: number): void;
onError(err: any): any;
end(resultCode: number): any;
mapLabel(name: string, value: number): void;
getLabel(name: string): number | undefined;
getCurrentIndex(): number;
}