Skip to content

chore: Update Jest config to map next export to source correctly - #6349

Merged
Gudahtt merged 1 commit into
mainfrom
fix-tests-that-use-base-controller-next-export
Aug 21, 2025
Merged

chore: Update Jest config to map next export to source correctly#6349
Gudahtt merged 1 commit into
mainfrom
fix-tests-that-use-base-controller-next-export

Conversation

@Gudahtt

Copy link
Copy Markdown
Member

Explanation

Tests that used the @metamask/base-controller/next export were not working correctly until after a build was completed. They were using the built code rather than the source code. On CI the tests run without any build, so they would always fail.

This was resolved up updating the TSConfig and Jest config to map the next export to the correct source code.

This unblocks #6335 as well as other controller migrations to the upcoming BaseController version.

References

Relates to #5626

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@Gudahtt
Gudahttforce-pushed the fix-tests-that-use-base-controller-next-export branch from 7262b93 to a85fa14CompareAugust 20, 2025 18:13
@Gudahtt
Gudahtt marked this pull request as ready for review August 20, 2025 18:32
@Gudahtt
Gudahttforce-pushed the fix-tests-that-use-base-controller-next-export branch from a85fa14 to 1ccaefdCompareAugust 20, 2025 18:32
Tests that used the `@metamask/base-controller/next` export were not
working correctly until after a build was completed. They were using
the built code rather than the source code. On CI the tests run without
any build, so they would always fail.
This was resolved up updating the TSConfig and Jest config to map the
`next` export to the correct source code.
This unblocks #6335 as well as other controller migrations to the
upcoming BaseController version.
@Gudahtt
Gudahttforce-pushed the fix-tests-that-use-base-controller-next-export branch from 1ccaefd to fd4a4f8CompareAugust 21, 2025 12:15

@cryptodev-2scryptodev-2s left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gudahtt
Gudahtt enabled auto-merge (squash) August 21, 2025 12:19
@Gudahtt
Gudahtt merged commit 9640c95 into mainAug 21, 2025
231 checks passed
@Gudahtt
Gudahtt deleted the fix-tests-that-use-base-controller-next-export branch August 21, 2025 12:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Gudahtt@cryptodev-2s