-
Notifications
You must be signed in to change notification settings - Fork 25
fix: core json tests #570
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
base: main
Are you sure you want to change the base?
fix: core json tests #570
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #570 +/- ##
==========================================
- Coverage 80.68% 80.66% -0.02%
==========================================
Files 128 128
Lines 12389 12392 +3
Branches 887 887
==========================================
Hits 9996 9996
- Misses 2390 2393 +3
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
| File | Base | Head | Diff |
|---|---|---|---|
orama-db.json |
8.02 MB | 8.02 MB | -1.86 KB (-0.02%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR attempts to fix test cases run by Node.js's test/doctool/test-doc-api-json.mjs by modifying the legacy JSON generator. The changes aim to adjust the JSON output format to match expected test results.
Changes:
- Removed the
apifield from the root module object initialization in buildSection.mjs - Added JSON formatting with 2-space indentation to the JSON.stringify call in index.mjs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/generators/legacy-json/utils/buildSection.mjs | Removes the api field from rootModule initialization |
| src/generators/legacy-json/index.mjs | Adds formatting parameters to JSON.stringify for 2-space indented output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/generators/legacy-json/index.mjs
Outdated
|
|
||
| await writeFile(out, JSON.stringify(section)); | ||
| // eslint-disable-next-line no-unused-vars | ||
| const { api, ...content } = section; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I like destructuring this tbh. I think since this is an extra field we could simply update upstream tests and add it to the allowlist on the test within the branch :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to make a patch and I can amend it on the doc-kit PR on nodejs/node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok!
Some changes to fix test cases run by https://github.com/nodejs/node/blob/main/test/doctool/test-doc-api-json.mjs