Cleaning the database checks for process.env

This commit is contained in:
Robert Schäfer 2019-06-04 15:28:06 +02:00
parent 0289412ba7
commit e3b4e9bf56

View File

@ -1,8 +1,7 @@
import { cleanDatabase } from './factories' import { cleanDatabase } from './factories'
import CONFIG from './../config'
if (!CONFIG.DEBUG) { if (process.env.NODE_ENV === 'production') {
throw new Error(`YOU CAN'T CLEAN THE DATABASE WITH DEBUG=${CONFIG.DEBUG}`) throw new Error(`You cannot clean the database in production environment!`)
} }
;(async function() { ;(async function() {