Check out example codes for "identity-obj-proxy not working". It will help you in understanding the concepts better.

Code Example 1

module.exports = {
 moduleNameMapper: {
    '\\.(css|less|scss|sass|jpg|jpeg|png|gif|webp|svg|jp?g|png|svg|gif|raw|webp|mpg|mp4|mp3|avi|ogv|ogg|wmv|amv|webm)$':
      'identity-obj-proxy'
  },
}

Learn ReactJs, React Native from akashmittal.com