fix(core): update

This commit is contained in:
2020-09-23 23:30:54 +00:00
parent 4cc149069e
commit aaaa8b3ee4
3 changed files with 1670 additions and 1268 deletions

View File

@ -6,8 +6,13 @@ export {
};
let testServer: AgTestServer;
export const createTestServer = async (handlerArg: plugins.agSdk.AAgHandler<any>) => {
testServer = new AgTestServer(handlerArg);
export const createTestServer = async (handlerArg: { new(envHandler: plugins.agSdk.AgEnvironment): plugins.agSdk.AAgHandler<any> }) => {
class AgEnvironement extends plugins.agSdk.AgEnvironment {
public async getEnvVar(nameArg: string) {
return '';
}
}
testServer = new AgTestServer(new handlerArg(new AgEnvironement()));
await testServer.start();
return testServer;
};