| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Replace flat test() calls with suite/test nesting so test output shows the directory hierarchy while still supporting --test-name-pattern filtering at any level (suite or leaf test). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
As #50 is merged, do we still need this? |
Sorry, something went wrong.
|
Short answer: Yes. This is an alternative suggestion that I'd like to propose (even with #50 merged) - the description above outlines two reasons I think this is better than the current state of the harness. |
Sorry, something went wrong.
I don't have a strong opinion about this. It would be interesting to see @legendecas perspective. |
Sorry, something went wrong.
|
|
||
| ```bash | ||
| $ NODE_OPTIONS=--test-name-pattern=js-native-api/test_constructor/test_null npm run node:test | ||
| $ NODE_OPTIONS=--test-name-pattern=test_constructor npm run node:test |
There was a problem hiding this comment.
There are test files with the same name in different folders, like js-native-api/2_function_arguments/test and js-native-api/3_callbacks/test. I think it is still helpful to be able to filter tests with a path.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is mainly an alternative suggestion to #50 - feel free to close.
Summary
Motivation
PR #50 flattened all tests into top-level test() calls with path-like names (e.g. js-native-api/test_string/test.js) to enable --test-name-pattern filtering. This works but comes with trade-offs:
Using suite()/test() nesting preserves all of these while still supporting --test-name-pattern — the Node.js test runner matches the pattern against suite names too, running all tests inside a matching suite.
Test plan
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com