Open mrhouzlane opened 1 year ago
test("#1 auth can get Access Token", async (done) => { const variables = { input: { clientId: CLIENT, grantType: "client_credentials", scope: "profile openid" } }; const send = { query: authGql, variables: variables, operationName: "auth" }; const auth = await request .post(path) .set("Authorization", "bearer " + jwtToken) .send(send) .expect(200) .then((res) => { assert.strictEqual(res.body.data.auth.success, true); assert.strictEqual(res.body.data.auth.message, "success"); return res.body.data.auth; }); accessToken = auth.accessToken; done();
I tried auth.end(); but it didn't worked
auth.end();
When running this test I get socket hang up.
I tried
auth.end();
but it didn't worked