fix(embed): mock @audius/sdk virtually in BedtimeClient test - #14611
Merged
Merged
Conversation
The Embed Deploy job now runs jest before building, so @audius/sdk has no dist and jest can't resolve the module it's mocking. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
dylanjeffers
added a commit
that referenced
this pull request
Sep 24, 2026
…#14612) Follow-up to #14611. The jest test now passes in the Embed Deploy job ([run 36062074996](https://github.com/AudiusProject/apps/actions/runs/36062074996)), but `npm run verify` in the same step still fails: - `dotenv-linter: not found`: the binary is downloaded by the package's `install` script into `packages/dotenv-linter/bin`, which isn't in the node_modules cache, and the job only runs `rebuild --ignore-scripts`. I've added the same missing-binary check `mobile.yml` uses. - eslint `import/no-unresolved` for `@audius/harmony`, `@audius/sdk` and `@audius/fixed-decimal`: their `dist/` isn't built yet. I've added `turbo run build --filter='embed^...'`, the same step `embed.yml` runs. `build:prod` afterwards reuses the turbo cache. This job only runs on main pushes, so it can't be exercised from the PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Embed Deploy has failed on main since #14604 added a
Verify embedstep that runs jest beforeBuild embed. When jest mocks a module with a factory, it still resolves the real module.@audius/sdkpoints atdist/, which doesn't exist until the build runs:Marking the mock
{ virtual: true }skips that resolution. I reproduced locally with an unbuilt@audius/sdkstub: the test fails the same way before this change and passes 3/3 after.🤖 Generated with Claude Code