michmech / xonomy

A schema-driven XML editor for the web.
MIT License
91 stars 32 forks source link

Add unit tests #42

Open GerkinDev opened 5 years ago

GerkinDev commented 5 years ago

In order to speed up a library rewrite (#41), having some tests would be great.

For unit & integration tests, jest could be used. For end-to-end, you can find some popular tools with samples on this gist.

Unit & integration tests could be long to write, so the order of priority would be:

  1. e2e test
  2. integration test
  3. unit test

I'll add missing tests during the rewrite anyway, but e2e would greatly reduce regressions. Moreover, the actual lib can totally be tested with e2e.