-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unit testing #134
Comments
Hello, I think that Unit tests are always a good practice whatever is the project. It should indeed help us to prevent code regression with the further changes. However I'm not familar with unit testing with javascript, I'm wondering where to begin with Mapael, and if the functions could be easily testable. In any case, feel free to make proposals for unit testing Mapael if you have enough time ! |
I will try starting something (like instanciating QUnit and building some basic tests). We will build incrementally from that :-) |
It's ok for me, thank you for your help ! |
I found some example of jQuery plugin using UT: I think we should have only one HTML file, with multiple JS files organized as module (http://api.qunitjs.com/QUnit.module).
|
Thank you, it looks ok to me, I think these modules should cover all the major features of Mapael ! |
At the end, we will also be able to automate these tests using Travis or equivalent! |
Yes this is a very good point as it will contribute to improve the overall quality of the plugin. I will check the integration of travis through GitHub asap. |
I have started to configure automated test (jshint and qunit) through Travis CI :
Build info on Travis : https://travis-ci.org/neveldo/jQuery-Mapael . It seems there are two remaining fails. However, I get a weird behavior on my machine : each time I run Qunit through |
Woah! So nice! |
We should also integrate a Code Coverage tool in order to monitor our progress on Unit Testing. What do you think? |
Hello, I agree with you, it's a great idea ! I think I will set up coveralls.io, it seems that it is a lot more documented than codecov.io. |
Great :) let me know when it is ready! |
Hello,
I wonder if we should add some UT to Mapael? That would make the development easier?
A lot of people seems to like QUnit (https://qunitjs.com). Never tried it, but seems good.
Here is some reading:
http://andymatthews.net/read/2012/05/29/Unit-Testing-jQuery-Plugins-with-Grunt-and-QUnit
http://javascriptplayground.com/blog/2012/04/a-jquery-plugin-with-grunt-qunit
The text was updated successfully, but these errors were encountered: