dcfemtech / hackforgood-waba-map

DCFemTech Hack for Good 2016 - WABA Bike Map Project
MIT License
10 stars 9 forks source link

Client-side JavaScript unit tests? #86

Open alulsh opened 8 years ago

alulsh commented 8 years ago

As we create more issues and write more code to this project it will take more time and it will be tougher to manually test our code in the browser for common actions such as selecting buffers and bikelanes.

Testing client-side JavaScript is notoriously unpleasant compared to testing server-side code, but I'm open to someone writing client-side tests with mocha-phantomjs so that they can be run from the command line using npm test and automated with Travis CI.

This isn't something we need to do, but if someone loves writing client-side JavaScript tests (or wants to learn) this is a great opportunity to write some!

For reference, I wrote some simple Jasmine-based tests in my Pig Latin Translator side project (cringing at the amount of whitespace in those tests right now 😱 ). Mapbox.js also uses mocha-phantomjs and has a comprehensive set of specs to look at.

evanbret commented 7 years ago

Is anyone working on this yet? I've never built tests but JS is my primary language and I checked out some material on Mocha. I would love to give it a shot!

alulsh commented 7 years ago

Nope, nobody is working on this yet. Please go for it @evebee! We appreciate any help!

evanbret commented 7 years ago

@alulsh thanks! I am having trouble even installing mocha on my very-not-great personal computer, so no promises, but I'll see if I can.

axhon commented 7 years ago

Hi I'd also like to help with this. I don't have much experience with setting up client-side tests, but I'd love to collab with @evebee. Two heads is better than one!

axhon commented 7 years ago

What are some tests you'd like to see, @alulsh ?

evanbret commented 7 years ago

@axhon awesome! I still haven't been able to successfully install Mocha on my crappy laptop but maybe we can meet up and work on this at some point. Do you ever go to Code & Coffee?

axhon commented 7 years ago

@evebee Yes I do! I'm usually at the Alexandria Code and Coffee saturdays, but there aren't any scheduled until after the holidays. If you're on slack the dctech slack we can make plans to work on this. I'm @axhon on there as well

axhon commented 7 years ago

hi @alulsh I've got a branch I'd like to push to the repo, can you give me rights to do so?

alulsh commented 7 years ago

@axhon - repo access granted! Apologies for the wait.