jest-canvas-mock
jest-canvas-mock copied to clipboard
Multiple configurations found when configure jest-canvas-mock
Hello,
I work on an angular app and I need to test canvas element.
So I installed jest-canvas-mock, added the :
"jest": { "setupFiles": ["jest-canvas-mock"] },
in package.json.
when I run the tests I have the following message:
Multiple configurations found: * /home/sraye/IdeaProjects/customer/evercampaign/jest.config.ts *
jest key in /home/sraye/IdeaProjects/customer/evercampaign/package.json
In fact my jest setup is in the file jest.config.ts:
const { getJestProjects } = require('@nrwl/jest'); export default { projects: getJestProjects() };
any idea on how I can resolve this ? Thanks
If you already have a jest.config.js
(or .ts
) file, you can put jest-canvas-mock
in the customJestConfig.setupFiles
array. It works for me.
Reference: Official Jest configuration - setupFiles