If you see this error while running a jest test that imports @dynamic-labs/sdk-react-core, here is a solution for you:

  1. Add this line to the moduleNameMapper section of your jest.config.ts: 'main.global.cjs': '<rootDir>/__mocks__/styleMock.js',
export default {
  ... other settings ...
  moduleNameMapper: {
    'main.global.cjs': '<rootDir>/__mocks__/styleMock.js',
  }
}
  1. Add the mock to __mocks__/styleMock.js:
module.exports = {};