Skip to content

Commit 0a1a16b

Browse files
committed
Update Jest config to map next export to source correctly
1 parent 01ec27d commit 0a1a16b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

jest.config.packages.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ module.exports = {
8080
// Here we ensure that Jest resolves `@metamask/*` imports to the uncompiled source code for packages that live in this repo.
8181
// NOTE: This must be synchronized with the `paths` option in `tsconfig.packages.json`.
8282
moduleNameMapper: {
83+
'^@metamask/base-controller/next': [
84+
'<rootDir>/../base-controller/src/next',
85+
],
8386
'^@metamask/(.+)$': [
8487
'<rootDir>/../$1/src',
8588
// Some @metamask/* packages we are referencing aren't in this monorepo,

tsconfig.packages.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* `jest.config.packages.js`.
1414
*/
1515
"paths": {
16+
"@metamask/base-controller/next": ["../base-controller/src/next"],
1617
"@metamask/*": ["../*/src"]
1718
},
1819
"strict": true,

0 commit comments

Comments
 (0)