Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple configurations found when configure jest-canvas-mock #97

Open
Choupa-web opened this issue Jul 4, 2022 · 1 comment
Open

Comments

@Choupa-web
Copy link

Choupa-web commented Jul 4, 2022

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

@Choupa-web Choupa-web changed the title Multiple configurations found when configure jes-canvas-mock Multiple configurations found when configure jest-canvas-mock Jul 4, 2022
@leoh7
Copy link

leoh7 commented Sep 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants