I'm using jest for my backend testing. Here I'm login to aws using aws-sdk. I get the response successfully, then complete the test case, but then jest throws an error about open handles.
const login = (options) => {
const cognito = new aws_sdk.CognitoIdentityServiceProvider();
const request = cognito.initiateAuth({
"AuthParameters": {
"USERNAME": options.username,
"PASSWORD": options.password,
},
"ClientId": options.CLIENT_ID
});
return request;
};
After searching, I found people have this error when connecting with database, and not closing database connect / their nodejs server. These issue is not with my application as I'm my backend is completely serverless.I is not an express app.
