You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Router,HttpRequest,HttpResponse}from"@plutolang/pluto";varusers=[{name: 'tobi'},{name: 'loki'},{name: 'jane'}];constrouter=newRouter("router");router.get("/api/users",async(req: HttpRequest): Promise<HttpResponse>=>{return{statusCode: 200,body: JSON.stringify(users)};});router.post("/api/user/:name",async(req: HttpRequest): Promise<HttpResponse>=>{constnewUser=req.params.name;users.push({name: newUser});return{statusCode: 200};});// Can be used to display the URL of the HTTP server.console.log(`The URL of the HTTP server is`,router.url);constrouterTester=newTester("router tester");routerTester.it("test case",async()=>{// Can be used to perform end-to-end testing for the HTTP server.constresp=awaitfetch(router.url);if(resp.status!==200){thrownewError("failed.");}});
Expected Behavior
During the testing phase, deduce and generate 3 lambda functions corresponding to two handlers of the Router and the test case of the Tester. After deployment, invoke the lambda corresponding to the Tester's test case for execution.
In the deployment phase, also deduce and generate 3 lambda functions corresponding to the two handlers of the Router and the main code. After deployment, invoke the lambda corresponding to the main code for execution.
The text was updated successfully, but these errors were encountered:
Expected Behavior
During the testing phase, deduce and generate 3 lambda functions corresponding to two handlers of the Router and the test case of the Tester. After deployment, invoke the lambda corresponding to the Tester's test case for execution.
In the deployment phase, also deduce and generate 3 lambda functions corresponding to the two handlers of the Router and the main code. After deployment, invoke the lambda corresponding to the main code for execution.
The text was updated successfully, but these errors were encountered: