-
Notifications
You must be signed in to change notification settings - Fork 939
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
Set up Karma and Browserify #378
Set up Karma and Browserify #378
Conversation
…server side tests. Added karma for front-end testing.
Nice job. Wondering if it might be better to run browser tests with mocha? That way we can reuse tests on both platforms. |
We are. Karma bootstraps the front-end test running process so it can be used in CI; it builds a page with the front-end files and mocha tests, then hits it with PhantomJS. In theory, we can also use Firefox on TravisCI, but I haven't got it set up yet. However, I did split out the tests; in the front-end, |
Combining the tests turned out to be easier than I expected :) I've added coverage to the server-side tests, and set up coveralls. So now the only problem is that there's no real tests, and my first attempt to add a real test is going awry. @thebigredgeek Do you want to help me figure out what's wrong with this test, or do you want to merge first so we don't drift too far apart? |
@yamikuronue yeah let's just get the existing smoke tests running on the client as well as the server |
Then we are good to go once you resolve those conflicts :) |
I can't resolve :(. On your branch |
Oh, my bad; the button was greyed out and it said something about write access so I assumed it was permissions, but the button hover text says I have to do it from the command line. Which. Well. Here goes nothing! If I do not return from the front lines of git, it was an honor working with you ;) |
…y hook now updates it automatically, but I removed the babelrc file since we don't need it anymore.
…h-browserify Conflicts: dist/debug.js test/.babelrc test/debug_spec.js
Changes Unknown when pulling f484cfe on yamikuronue:replace-babel-with-browserify into ** on visionmedia:master**. |
not sure why your merge attempt failed @yamikuronue, but assuming i merged the way you wanted it done you should be good now. ;-) |
Thank you @AccaliaDeElementia !! @thebigredgeek We should be good to merge now :) |
Thanks! Looks like conflicts again :(. Also, can we ditch the commit hooks? |
We can, but I added them because it looked like you've had some issues with not having the dist folder get committed previously? Gosh darn conflicts... |
merge conflict resolved (again) :-) |
Changes Unknown when pulling f512cf2 on yamikuronue:replace-babel-with-browserify into ** on visionmedia:master**. |
Thanks. LGTM! Yeah, we removed dist completely. Thanks for this! |
I don't know if you want to merge this yet, but I wanted to show it to you for review to see if you like the direction I'm going here.
What I've done so far:
I'm also looking into git hooks to run browserify as a pre-commit hook, but I only have that set up locally for now. That will help keep dist up to date. I'm also still staring at Istanbul docs since I've never hooked it up for client-side tests before, but I think it looks possible now that I've split it apart. Oh, and I added an expect statement to your sanity test.