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

mock less and svg files in tests #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

mock less and svg files in tests #2

wants to merge 1 commit into from

Conversation

thibautsabot
Copy link

@thibautsabot thibautsabot commented Dec 18, 2019

Je suis tombé sur jestjs/jest#2663

qui préconise de faire

    "moduleNameMapper": {
      ".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "identity-obj-proxy"
    }

et d'installer identity-obj-proxy (ou la même chose avec https://github.com/eddyerburgh/jest-transform-stub).

C'est également ce que dit la doc officielle de Jest : https://jestjs.io/docs/en/webpack
(Next utilise https://webpack.js.org/)

Donc là j'ai juste créé deux fichiers bidons en suivant les indications.

image

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

Successfully merging this pull request may close these issues.

1 participant