Skip to content
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

Test Failures and Errors in pnpm test with Node.js 18.12 #1581

Closed
jeanpierrecarvalho opened this issue Aug 15, 2023 · 5 comments
Closed

Test Failures and Errors in pnpm test with Node.js 18.12 #1581

jeanpierrecarvalho opened this issue Aug 15, 2023 · 5 comments

Comments

@jeanpierrecarvalho
Copy link

Environment

Nitro Package Version: 2.5.2
Node Version: v18.12.1
Operating System: Linux

Reproduction

  • Fork and clone unjs/nitro
  • Enable corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Activate passive watcher using pnpm stub
  • Run the pnpm test command

Describe the bug

When installing a fresh repository and running the tests using the the following error occurs, leading to the failure of 3 tests:

FAIL  test/presets/nitro-dev.test.ts > nitro:preset:nitro-dev > headers > handles headers correctly
FAIL  test/presets/node.test.ts > nitro:preset:node > headers > handles headers correctly
FAIL  test/presets/vercel.test.ts > nitro:preset:vercel > headers > handles headers correctly

It seems that the tests related to handling headers correctly in various presets (nitro-dev, node, and vercel) are failing.

This issue prevents successful test execution, and the headers handling functionality seems to be the root cause of the failure.

Please investigate and address this bug as it impacts the reliability of the Nitro package. If you require any further information or assistance, feel free to reach out.

Additional context

No response

Logs

No response

@jeanpierrecarvalho
Copy link
Author

image

@jeanpierrecarvalho
Copy link
Author

Could this PR be the reason behind the issue? #1452

@jeanpierrecarvalho
Copy link
Author

Running pnpm test using v17.0.0 all the tests passed successfully.

Running pnpm test using v18.0.0 the headers["set-cookie"] is undefined

Running pnpm test using v18.12.1 the headers["set-cookie"] is foo=bar, bar=baz, test=value; Path=/,… and is expected [ 'foo=bar, bar=baz', …(2) ]

@pi0
Copy link
Member

pi0 commented Aug 15, 2023

Hi dear @jeanpierrecarvalho thanks for raising this issue 👍🏼 If you upgrade to the latest v18.16.1, the tests successfully pass (18.12.0 seems to have issues that are solved in latest. i can reproduce only with 18.12 too).

BTW we are aware of cookie-splitting misbehavior between different Node.js versions (you can followup from #1462). It is not as critical as it seems and not a new issue (we added more tests in the suite to track only).

@pi0 pi0 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2023
@pi0 pi0 changed the title Test Failures and Errors in pnpm test Test Failures and Errors in pnpm test with Node.js 18.12 Aug 15, 2023
@jeanpierrecarvalho
Copy link
Author

Thanks @pi0 for the speedy response! I'll take a look at #1462.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants