I'm about to implement some API tests using Supertest and Typsecript. Problem is, I'm new to typescript. I've installed both superstest and @types/supertest from npm, but I'm not sure how I'm supposed to make reference to @types/supertest. In my below code, my DIE (VS Code) is not happy about "app" or "applicationJson".
import * as request from 'supertest';
getToken: async function(tokenUsername, tokenPassword) {
return await request(app).post(
`https://foobar/login`,
{ accept: applicationJson },
{
Email: tokenUsername,
Password: tokenPassword,
},
envConfig.BaseUrl);
}
What on earth am I missing?