Skip to content

Conversation

@owlstronaut
Copy link
Contributor

@owlstronaut owlstronaut commented Oct 24, 2025

This is because there are inconsistencies between node 20, 22, and 24. Here's my chart:

test version result
node --test 20 🔴 runs workspace tests when it shouldn't
node --test 22 🔴 runs workspace tests when it shouldn't
node --test 24 🔴 runs workspace tests when it shouldn't
node --test test 20 💚
node --test test 22 🔴 just fails
node --test test 24 🔴 just fails
node --test ./test 20 💚
node --test ./test 22 🔴 just fails
node --test ./test 24 🔴 just fails
node --test ./test/**/*.js 20 🔴 works run manually, fails when run with npm run test
node --test ./test/**/*.js 22 💚
node --test ./test/**/*.js 24 💚
node --test './test/**/*.js' 20 🔴
node --test './test/**/*.js' 22 💚
node --test './test/**/*.js' 24 💚
node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 './test/**/*.js' 20 🔴
node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 './test/**/*.js' 22 💛 doesn't show same coverage as 24
node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 './test/**/*.js' 24 💚 full coverage
  • Currently, we are only using coverage in 24, for both consistency and it's supported
  • There is no script option that supports tests running for all 3 versions
  • It appears trying to let the shell do the globbing doesn't work as expected in the npm scripts

Conclusion
The easiest thing to do is add a test script for v20 that we can remove when v20 is no longer supported.

@owlstronaut
Copy link
Contributor Author

Experimentation branches showing it couldn't work otherwise: npm/statusboard#1031, npm/abbrev-js#115

@owlstronaut owlstronaut marked this pull request as ready for review October 27, 2025 16:14
@owlstronaut owlstronaut requested a review from a team as a code owner October 27, 2025 16:14
@owlstronaut owlstronaut force-pushed the owlstronaut/test-globbing branch 2 times, most recently from b115540 to b7ee03d Compare October 27, 2025 21:11
@owlstronaut owlstronaut force-pushed the owlstronaut/test-globbing branch from b7ee03d to 92ba26b Compare October 28, 2025 15:25
@owlstronaut owlstronaut merged commit dccde95 into main Oct 29, 2025
17 checks passed
@owlstronaut owlstronaut deleted the owlstronaut/test-globbing branch October 29, 2025 15:59
@github-actions github-actions bot mentioned this pull request Oct 29, 2025
owlstronaut pushed a commit that referenced this pull request Oct 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.28.0](v4.27.1...v4.28.0)
(2025-10-29)
### Features
*
[`dccde95`](dccde95)
[#537](#537) adds script to run
tests with node 20 correctly (@owlstronaut)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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