Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeAll(async () => {
const credentials = await getCredentials(projectKey)
apiConfig = {
host: CONSTANTS.host.auth,
apiUrl: CONSTANTS.host.api,
projectKey,
credentials: {
clientId: credentials.clientId,
clientSecret: credentials.clientSecret,
},
}
await clearData(apiConfig, 'orders')
await clearData(apiConfig, 'inventory')
await clearData(apiConfig, 'types')
await createData(apiConfig, 'types', customFields)
await createData(apiConfig, 'inventory', inventories)
}, 30000)
beforeAll(async () => {
const credentials = await getCredentials(projectKey)
apiConfig = {
host: CONSTANTS.host.auth,
apiUrl: CONSTANTS.host.api,
projectKey,
credentials: {
clientId: credentials.clientId,
clientSecret: credentials.clientSecret,
},
}
await clearData(apiConfig, 'orders')
await clearData(apiConfig, 'inventory')
await clearData(apiConfig, 'types')
await createData(apiConfig, 'types', customFields)
await createData(apiConfig, 'inventory', inventories)
}, 30000)