rubyforgood / habitatebsv

An upcoming project for Ruby for Good
https://rubyforgood.github.io/habitatebsv/
MIT License
4 stars 2 forks source link

Adding Jasmine for testing javascript #29

Closed tmobaird closed 5 years ago

tmobaird commented 5 years ago

Description

Adding unit tests for our JavaScript code. There's not a lot of JavaScript right now so this might be overkill, but adding a simple, browser compatible testing tool like Jasmine gives developers confidence to refactor the JS we have and determine if anything would actually break.

Adding tests specifically for the DOM manipulation specific JS code.

Note: I have no idea if we think this is actually necessary, since the project is so small, but this was definitely useful when cleaning up the index.js a bit.

Type of change

How Has This Been Tested?

  1. Pull the branch locally
  2. Open SpecRunner.html in your browser locally to run all tests
  3. If all tests pass then all things should be good :+1:

Screenshots

image