wellsjo / JSON-Splora

GUI app for editing, visualizing, and manipulating JSON data
MIT License
1.86k stars 60 forks source link

Create tests #51

Closed wellsjo closed 7 years ago

wellsjo commented 7 years ago

unit and functional tests

vpillinger commented 7 years ago

I have looked into this a little bit. I think that there are two libraries I found for this that make sense. 1) Use something like Jasmine for unit testing of custom code. 2) Use a library like Spectron for functional testing.

I am going to start work on implementing Jasmine tests. I highly recommend that once we get some testing framework in place, that changes without accompanying tests are no longer accepted in the repo.

Something to keep in mind is that there is a lot of work being done in things that are (better as) third-party libraries: parser, linter, ect. Therefore, efforts should be made to add testing to those libraries. We might still want to component test that our use of those libraries are correct (ie, that linter errors are displayed correctly, or that some test inputs are parsed correctly.).

Edit: I was thinking about how to make a watch to automatically run Jasmine tests. I think that the easiest ways I know to do this are to use either grunt or gulp. Any thoughts on this? I figure I can also make watch task run eslint as well. I am not sure if minification and/or concatenation give any benefits in an electron app, but I can setup build to do those if they would.

wellsjo commented 7 years ago

implemented in #57