mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Fix 404 errors when running tests with NODE_ENV=test
production_safety_test.js requires tests to run with NODE_ENV set to `test`. The /test endpoint was previously only enabled with NODE_ENV set to `development` which results in the api3 security tests failing with 404 errors. Instead, enable it for NODE_ENV set to `test`.
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@ function configure (env, ctx) {
|
||||
|
||||
app.get('/version', require('./specific/version')(app, ctx, env));
|
||||
|
||||
if (app.get('env') === 'development' || app.get('ci')) { // for development and testing purposes only
|
||||
if (app.get('env') === 'test' || app.get('ci')) { // for development and testing purposes only
|
||||
app.get('/test', async function test (req, res) {
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user