I'm currently setting up unit tests for a project and have stumbled on a issue with imports on a dependency.
My jest.config.js is:
export default {
preset: "ts-jest/presets/default",
testEnvironment: 'jsdom',
testRegex: "ui-modifications/test/",
moduleDirectories: ["node_modules", "src"],
globals: {
"ts-jest": {
diagnostics: false,
isolatedModules: true,
},
},
};
Currently this is the error I am getting when running the tests
Cannot find module '@forge/bridge' from 'src/index.ts'
where @forge/bridge is the said dependency and src/index.ts is the file I am currently trying to test.
I am assuming I either have some config missing or some wrong.
Any help would be appreciated :)