Avoided config.local.json loading in testing-browser environment

- this should be checking if we're in any of the testing envionments and
  avoid loading the `config.local.json` file if so
This commit is contained in:
Daniel Lockyer 2022-12-07 16:23:37 +07:00
parent e323d6162c
commit 464504a8e1
No known key found for this signature in database

View File

@ -30,7 +30,7 @@ function loadNconf(options) {
// Now load various config json files
nconf.file('custom-env', path.join(customConfigPath, 'config.' + env + '.json'));
if (env !== 'testing') {
if (!env.startsWith('testing')) {
nconf.file('local-env', path.join(customConfigPath, 'config.local.json'));
}
nconf.file('default-env', path.join(baseConfigPath, 'env', 'config.' + env + '.json'));