place config require logic inside try/catch

This commit is contained in:
Dave Eddy 2015-10-01 12:28:06 -04:00
parent 3ba8f312f1
commit b225896a5e

View File

@ -32,8 +32,8 @@ if (process.env.TRITON_TEST_PROFILE) {
}); });
CONFIG.destructiveAllowed = !!process.env.TRITON_TEST_DESTRUCTIVE_ALLOWED; CONFIG.destructiveAllowed = !!process.env.TRITON_TEST_DESTRUCTIVE_ALLOWED;
} else { } else {
CONFIG = require('../config.json');
try { try {
CONFIG = require('../config.json');
assert.object(CONFIG, 'test/config.json'); assert.object(CONFIG, 'test/config.json');
assert.string(CONFIG.url, 'test/config.json#url'); assert.string(CONFIG.url, 'test/config.json#url');
assert.string(CONFIG.account, 'test/config.json#account'); assert.string(CONFIG.account, 'test/config.json#account');