dimanche 6 mai 2018

How to force jest to output snapshots inside root lvl __snapshots__ folder?

I came across small issue with jest today, my folder structure follows this convention

components/
   Paragraph/
     index.js
     style.js
     test.js

When I run jest snapshot tests it generates them inside each component folder i.e

components/
   Paragraph/
     __snapshots__
     index.js
     style.js
     test.js

Is there a way to force jest to put all snapshots inside root lvl __snapshot__ folder? So final output looks more like this

__snapshots__
   // All snapshots here?
components/
   Paragraph/
     index.js
     style.js
     test.js

Aucun commentaire:

Enregistrer un commentaire