Finished 261 revised testing javascript with jasmine

Fixed #323