Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side JavaScript unit tests? #86

Open
alulsh opened this issue Aug 17, 2016 · 9 comments
Open

Client-side JavaScript unit tests? #86

alulsh opened this issue Aug 17, 2016 · 9 comments

Comments

@alulsh
Copy link
Member

alulsh commented Aug 17, 2016

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
Copy link

evanbret commented Dec 9, 2016

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
Copy link
Member Author

alulsh commented Dec 10, 2016

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

@evanbret
Copy link

@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
Copy link

axhon commented Dec 22, 2016

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
Copy link

axhon commented Dec 22, 2016

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

@evanbret
Copy link

@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
Copy link

axhon commented Dec 22, 2016

@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
Copy link

axhon commented Feb 16, 2017

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

@alulsh
Copy link
Member Author

alulsh commented Feb 17, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants