KirkMcDonald / kirkmcdonald.github.io

Simple web-based calculator for the game Factorio.
Apache License 2.0
547 stars 146 forks source link

Add tests #81

Open KirkMcDonald opened 6 years ago

KirkMcDonald commented 6 years ago

Several times now, I've broken things while fixing other things. This is annoying. The solution is to implement comprehensive unit and functional tests.

There are probably JS unit testing frameworks out there. Writing tests for the core, computational parts of the application should be relatively straightforward.

Functional tests could be done with something like Selenium WebDriver. These tests could automate putting the calculator through its paces, testing every part of the UI and every state transition.