Skip to content

Commit a482019

Browse files
committed
Adds fail calls when next() calls traverse tests
1 parent 1687c89 commit a482019

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/helper.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ let openConnections = {};
107107
var app = express();
108108
var api = new ParseServer(defaultConfiguration);
109109
app.use('/1', api);
110+
app.use('/1', (req, res) => {
111+
fail('should not call next');
112+
});
110113
var server = app.listen(port);
111114
server.on('connection', connection => {
112115
let key = `${connection.remoteAddress}:${connection.remotePort}`;
@@ -126,7 +129,9 @@ const reconfigureServer = changedConfiguration => {
126129
api = new ParseServer(newConfiguration);
127130
api.use(require('./testing-routes').router);
128131
app.use('/1', api);
129-
132+
app.use('/1', (req, res) => {
133+
fail('should not call next');
134+
});
130135
server = app.listen(port);
131136
server.on('connection', connection => {
132137
let key = `${connection.remoteAddress}:${connection.remotePort}`;

0 commit comments

Comments
 (0)