Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
...{ scopes: [`manage_project:${projectKey}`] },
...{
credentials: {
clientId: apiConfig.credentials.clientId,
clientSecret: apiConfig.credentials.clientSecret,
user: {
username: userEmail,
password: userPassword,
},
},
},
fetch,
}
const client = createClient({
middlewares: [
createAuthMiddlewareForPasswordFlow(userConfig),
httpMiddleware,
],
})
return client
.execute({
uri: `/${projectKey}/me`,
method: 'GET',
})
.then(response => {
const user = response.body
expect(user).toHaveProperty('email', userEmail)
})
})
})