Check out example codes for "jest to handle css". It will help you in understanding the concepts better.

Code Example 1

{
  "jest":{
     "moduleNameMapper": {
      "\\.(css|less|scss|sass)$": "identity-obj-proxy"
    },
  }
}

Learn ReactJs, React Native from akashmittal.com