fix: Parse Server doesn't shutdown gracefully (#9634)

This commit is contained in:
Diamond Lewis
2025-03-27 15:38:51 -05:00
committed by GitHub
parent f55de2b342
commit aed918d310
19 changed files with 308 additions and 240 deletions

View File

@@ -3,11 +3,9 @@ const request = require('../lib/request');
describe('Enable express error handler', () => {
it('should call the default handler in case of error, like updating a non existing object', async done => {
spyOn(console, 'error');
const parseServer = await reconfigureServer(
Object.assign({}, defaultConfiguration, {
enableExpressErrorHandler: true,
})
);
const parseServer = await reconfigureServer({
enableExpressErrorHandler: true,
});
parseServer.app.use(function (err, req, res, next) {
expect(err.message).toBe('Object not found.');
next(err);