Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('works', async () => {
const appId = toBase64(args.appHelper.appId);
const url = `${tankerUrl}/verification/email/code`;
const body = {
email: 'bob@tanker.io',
app_id: appId,
auth_token: args.appHelper.authToken
};
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
expect(response.status).to.eq(200);
const res = await response.json();
const verificationCode = res.verification_code;