fix: mock Notion utils in convertInnerUrl tests - #14
Closed
tangly1024 wants to merge 8 commits into
Closed
Conversation
…ve no-implied-eval warning - Line 157-159: Wrap callback in arrow function for setTimeout to fix @typescript-eslint/no-implied-eval error - Line 206: Add missing dependencies to useEffect (ADSENSE_GOOGLE_ID, lang, props?.allLinkPages, props?.allNavPages)
…lrc-for-swc-build fix: restore SWC build by removing Babel config
👷 Deploy request for dashing-tanuki-1cd49d pending review.Visit the deploys page to approve it
|
|
Someone is attempting to deploy a commit to the sftbob's projects Team on Vercel. A member of the Team first needs to authorize it. |
tangly1024
force-pushed
the
codex/fix-jest-esm-notion-utils
branch
from
June 4, 2026 11:46
a3f8a1e to
a8d027c
Compare
|
此 PR 已超过 30 天无更新,请 rebase 或关闭。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
notion-utilshelper used byconvertInnerUrlunit tests..babelrc, so Next.js/Vercel can continue using SWC for production builds.Why
After removing the root
.babelrc, production builds can use SWC again, but the GitHub Actions unit-test job still runs through Jest. Jest ignoresnode_modulesby default, so it fails whenconvertInnerUrlimports the ESM build ofnotion-utils:The test only needs
idToUuid, so mocking that helper keeps the fix scoped to the unit test and avoids reintroducing project-level Babel configuration.Validation