File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ const express = require('express')
2
2
const instrument = require ( '../lib/instrument-middleware' )
3
3
const haltOnDroppedConnection = require ( './halt-on-dropped-connection' )
4
4
5
- const isDevelopment = process . env . NODE_ENV === 'development'
5
+ const { NODE_ENV } = process . env
6
+ const isDevelopment = NODE_ENV === 'development'
7
+ const isTest = NODE_ENV === 'test' || process . env . GITHUB_ACTIONS === 'true'
6
8
7
9
// Catch unhandled promise rejections and passing them to Express's error handler
8
10
// https://medium.com/@Abazhenov /using-async-await-in-express-with-node-8-b8af872c0016
@@ -13,7 +15,7 @@ const asyncMiddleware = fn =>
13
15
14
16
module . exports = function ( app ) {
15
17
// *** Request connection management ***
16
- app . use ( require ( './timeout' ) )
18
+ if ( ! isTest ) app . use ( require ( './timeout' ) )
17
19
app . use ( require ( './abort' ) )
18
20
19
21
// *** Development tools ***
You can’t perform that action at this time.
0 commit comments