Solved Issues
Could not parse CSS stylesheet
If you see this error while running a jest test that imports @dynamic-labs/sdk-react-core
, here is a solution for you:
- Add this line to the
moduleNameMapper
section of yourjest.config.ts
:'main.global.cjs': '<rootDir>/__mocks__/styleMock.js',
export default {
... other settings ...
moduleNameMapper: {
'main.global.cjs': '<rootDir>/__mocks__/styleMock.js',
}
}
- Add the mock to
__mocks__/styleMock.js
:
module.exports = {};
Was this page helpful?