8000 feat: test middleware [POC: DON'T MERGE] by nigrosimone · Pull Request #192 · dimdenGD/ultimate-express · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: test middleware [POC: DON'T MERGE] #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 23 commits into from

Conversation

nigrosimone
Copy link
Contributor
@nigrosimone nigrosimone commented May 8, 2025

I have add the test middleware in a lot of test, and there is some public property of request/response that are different

Eg. some test fails for this reasons:

async-error-handling.js

  +   req.baseUrl ""
  -   req.baseUrl undefined
  +   req.params {}
  -   req.params undefined

others

  +   res.headersSent false
  -   res.headersSent true
 +   req.params {}
 -   req.params {"test":"test"}

the failing tests has middleware commented

// app.use(require("../../middleware"));

maybe is my middleware wrong?

@nigrosimone nigrosimone marked this pull request as ready for review May 8, 2025 18:56
@nigrosimone nigrosimone changed the title feat: test middleware feat: test middleware [POC: DON'T MERGE] May 8, 2025
@nigrosimone nigrosimone marked this pull request as draft May 8, 2025 19:01
@nigrosimone nigrosimone mentioned this pull request May 8, 2025
@dimdenGD
Copy link
Owner
dimdenGD commented May 9, 2025

Imo this is a bad idea so it's better to not spend your time on this

@nigrosimone
Copy link
Contributor Author

Imo this is a bad idea so it's better to not spend your time on this

Yes, it's a bad idea... but i have found some problems, some of which have already been reported, eg.:

@nigrosimone nigrosimone closed this May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0