Skip to content

Commit

Permalink
feat: add scriptCache
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Jul 14, 2022
1 parent f3820d4 commit eba9696
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class ApiTestComponent implements OnInit, OnDestroy {
response: {},
request: {},
};
scriptCache = {};
testServer: TestServerLocalNodeService | TestServerServerlessService | TestServerRemoteService;
REQUEST_METHOD = objectToArray(RequestMethod);
REQUEST_PROTOCOL = objectToArray(RequestProtocol);
Expand Down Expand Up @@ -149,6 +150,10 @@ export class ApiTestComponent implements OnInit, OnDestroy {
this.testServer.close();
}
private test() {
this.scriptCache = {
beforeScript: this.beforeScript,
afterScript: this.afterScript,
};
this.testServer.send('unitTest', {
id: this.apiTab.tabID,
action: 'ajax',
Expand Down Expand Up @@ -178,7 +183,6 @@ export class ApiTestComponent implements OnInit, OnDestroy {
},
id
);
// console.log('test');
this.messageService.send({ type: 'updateHistory', data: {} });
}
}
Expand Down

0 comments on commit eba9696

Please sign in to comment.