test-sdk/ts/index.ts
2020-07-05 17:53:49 +00:00

18 lines
451 B
TypeScript

import * as plugins from './test-sdk.plugins';
import { AgTestServer } from './test-sdk.classes.testserver';
export { AgTestServer };
let testServer: AgTestServer;
export const createTestServer = async (handlerArg: plugins.agSdk.AAgHandler<any>) => {
testServer = new AgTestServer(handlerArg);
await testServer.start();
return testServer;
};
export const stopTestServer = async () => {
if (testServer) {
await testServer.stop();
}
};