CartoDB-SQL-API/test/helper.js
2020-12-17 11:11:49 +01:00

11 lines
300 B
JavaScript

'use strict';
let configFileName = process.env.NODE_ENV;
if (process.env.CARTO_SQL_API_ENV_BASED_CONF) {
// we override the file with the one with env vars
configFileName = 'config';
}
global.settings = require(`../config/environments/${configFileName}.js`);
process.env.NODE_ENV = 'test';