Galooshi / import-js

A tool to simplify importing JS modules
MIT License
524 stars 70 forks source link

Consider snapshot testing for Importer #324

Open lencioni opened 7 years ago

lencioni commented 7 years ago

Jest 14 came out and has a new feature called snapshot testing. More info here: http://facebook.github.io/jest/blog/2016/07/27/jest-14.html

The basic idea is that it generates snapshots of strings or objects that you check in to your codebase. When you run your test suite it checks them against the checked in snapshot and tells you if anything changed.

We've been discussing how we can improve our Importer test, and this might be worth looking at. Thoughts?

trotzig commented 7 years ago

Interesting. I didn't think it could be used for non-React stuff first, but after looking at it some more it definitely looks doable.