Skip to content

Commit a39614f

Browse files
authored
remove supertest dependency (github#28572)
* remove supertest dependency * remove bad test
1 parent c3e8b23 commit a39614f

File tree

6 files changed

+0
-349
lines changed

6 files changed

+0
-349
lines changed

lib/cookie-settings.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ export default {
22
httpOnly: true, // can't access these cookies through browser JavaScript
33
secure: !['test', 'development'].includes(process.env.NODE_ENV),
44
// requires https protocol
5-
// `secure` doesn't work with supertest at all
65
// http://localhost fails on chrome with secure
76
sameSite: 'lax',
87
// most browsers are "lax" these days,

middleware/handle-errors.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ async function logException(error, req) {
3030
}
3131

3232
export default async function handleError(error, req, res, next) {
33-
// When you run tests that use things doing get() requests in
34-
// our supertest handler, if something goes wrong anywhere in the app
35-
// and its middlewares, you get a 500 but the error is never displayed
36-
// anywhere. So this is why we log it additionally.
37-
// Note, not using console.error() because it's arguably handled.
38-
// Some tests might actually expect a 500 error.
39-
4033
const responseDone = res.headersSent || req.aborted
4134

4235
if (req.path.startsWith('/assets') || req.path.startsWith('/_next/static')) {

0 commit comments

Comments
 (0)