refactor: updating gatsby node file#1662
Conversation
| async function getBannersData() { | ||
| try { | ||
| const siteResponse = await fetch( | ||
| 'https://raw.githubusercontent.com/nodejs/nodejs.org/master/locale/en/site.json' |
There was a problem hiding this comment.
Couldnt get the mocks to work for this call and the calls in getNodeReleasesData. Idk what i could be doing wrong though. I ended up deleting the tests. Maybe they can be a future PR
Codecov Report
@@ Coverage Diff @@
## main #1662 +/- ##
=======================================
Coverage 90.49% 90.49%
=======================================
Files 72 72
Lines 768 768
Branches 219 220 +1
=======================================
Hits 695 695
Misses 72 72
Partials 1 1 Continue to review full report at Codecov.
|
|
I think you should wait for #1650 to be approved and merged before working any more on this, since major changes will be required here after that |
manishprivet
left a comment
There was a problem hiding this comment.
I have highlighted the major changes that needed to be done when moving from MarkdownRemark to Mdx.
|
@manishprivet I fixed all the merge conflicts. Everything should be working correctly now |
|
Please find a preview at: https://staging.nodejs.dev/1662/ |
|
LGTM 👍 |
rodion-arr
left a comment
There was a problem hiding this comment.
I've checked the fetch mock for missing tests and indeed it's not working there. Very interesting case, I'd like to dig deeper after this PR merged
Description
Refactor parts of
gatsby-nodeinto separate functions in separate files for readability.Related Issues
Fixes #1649