-
Notifications
You must be signed in to change notification settings - Fork 225
Migrate testing setup to use babel-jest #937
Conversation
CI is failing because When poking around locally, the package is infact there and symlinked to the folder. It's also referenced as expected in the Fixed: See comment below |
b9d8e4d
to
55c29d8
Compare
fc389f4
to
53b9920
Compare
jest.config.js
Outdated
@@ -16,15 +16,16 @@ const moduleNameMapper = getPackageNames().reduce( | |||
'<rootDir>/packages/react-html/src/server/index.ts', | |||
'@shopify/react-network/server': | |||
'<rootDir>/packages/react-network/src/server.ts', | |||
'@shopify/address-consts': '<rootDir>/packages/address-consts/src/index.ts', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shopify/address-conts
was not getting module mapped properly.
require.resolve('@shopify/address-consts')
was resolving to quilt/packages/address/src/index.ts
, instead of quilt/packages/address-consts/src/index.ts
. Moving this up in the list manually got the module resolving correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could also fix this by adding a $
to the @shopify/${name}
bit, presumably that part is a regex and address
matches address-consts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome 🥇
jest.config.js
Outdated
@@ -16,15 +16,16 @@ const moduleNameMapper = getPackageNames().reduce( | |||
'<rootDir>/packages/react-html/src/server/index.ts', | |||
'@shopify/react-network/server': | |||
'<rootDir>/packages/react-network/src/server.ts', | |||
'@shopify/address-consts': '<rootDir>/packages/address-consts/src/index.ts', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could also fix this by adding a $
to the @shopify/${name}
bit, presumably that part is a regex and address
matches address-consts
774bd2f
to
0b807cf
Compare
Description
Related to #857
This PR migrates quilts testing setup to use
babel-jest
overts-jest
. This is becausets-jest
has a hard time understanding TS project references. This also makes reviewing the subsequent PR to address #857 a bit easier.In summary:
babel
&babel-jest