Add tests for stats api

This commit is contained in:
Michael Jackson
2019-07-10 13:24:27 -07:00
parent 56110b0314
commit ce9206f59e
5 changed files with 56 additions and 14 deletions

View File

@ -4,7 +4,7 @@ const cloudflareURL = 'https://api.cloudflare.com/client/v4';
const cloudflareEmail = process.env.CLOUDFLARE_EMAIL;
const cloudflareKey = process.env.CLOUDFLARE_KEY;
if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {
if (process.env.NODE_ENV !== 'production') {
if (!cloudflareEmail) {
throw new Error('Missing the $CLOUDFLARE_EMAIL environment variable');
}