Skip to content

Commit 59a531d

Browse files
committed
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`.
1 parent 6b59dfc commit 59a531d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/api3/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function configure (env, ctx) {
7777

7878
app.get('/version', require('./specific/version')(app, ctx, env));
7979

80-
if (app.get('env') === 'development' || app.get('ci')) { // for development and testing purposes only
80+
if (app.get('env') === 'test' || app.get('ci')) { // for development and testing purposes only
8181
app.get('/test', async function test (req, res) {
8282

8383
try {

0 commit comments

Comments
 (0)