test-sdk/ts/index.ts

18 lines
451 B
TypeScript
Raw Normal View History

2020-07-04 15:22:44 +00:00
import * as plugins from './test-sdk.plugins';
2020-07-05 17:53:49 +00:00
import { AgTestServer } from './test-sdk.classes.testserver';
2020-07-04 15:22:44 +00:00
2020-07-05 17:53:49 +00:00
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();
}
};