Last active
March 11, 2019 07:30
-
-
Save gomorizsolt/c0921a823f109ce6e780ff25a28c91c1 to your computer and use it in GitHub Desktop.
React and Jest - handle non-Javascript files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The mock file can be something like this: | |
// module.exports = "test-file-stub"; | |
"jest": { | |
"moduleNameMapper": { | |
".+\\.(jpg|jpeg|png)$": "<rootDir>/path/to/your/mock/file" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment