1
0
mirror of synced 2025-12-20 18:36:31 -05:00

remove supertest dependency (#28572)

* remove supertest dependency

* remove bad test
This commit is contained in:
Peter Bengtsson
2022-06-16 11:56:41 -04:00
committed by GitHub
parent c3e8b23dde
commit a39614fdcf
6 changed files with 0 additions and 349 deletions

View File

@@ -30,13 +30,6 @@ async function logException(error, req) {
}
export default async function handleError(error, req, res, next) {
// When you run tests that use things doing get() requests in
// our supertest handler, if something goes wrong anywhere in the app
// and its middlewares, you get a 500 but the error is never displayed
// anywhere. So this is why we log it additionally.
// Note, not using console.error() because it's arguably handled.
// Some tests might actually expect a 500 error.
const responseDone = res.headersSent || req.aborted
if (req.path.startsWith('/assets') || req.path.startsWith('/_next/static')) {