From 0de5a74c9c9cffa95bebe71e3cefe7f76254939b Mon Sep 17 00:00:00 2001 From: saihaj Date: Wed, 16 Sep 2020 16:46:20 -0500 Subject: [PATCH] test: update config to handle static assets https://github.com/react-navigation/react-navigation/issues/7950 --- jest.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jest.config.js b/jest.config.js index d6faf697..3c04a323 100644 --- a/jest.config.js +++ b/jest.config.js @@ -24,4 +24,10 @@ module.exports = { '/test/setupJest.js', ], moduleFileExtensions: [ 'ts', 'tsx', 'js', 'jsx', 'json', 'node' ], + // https://github.com/react-navigation/react-navigation/issues/7950#issuecomment-615220412 + moduleNameMapper: { + '.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': + 'jest-transform-stub', + '\\.(css|less)$': 'identity-obj-proxy', + }, }