minimalect icon indicating copy to clipboard operation
minimalect copied to clipboard

Proposal : Add test cases to this great library

Open mallim opened this issue 11 years ago • 6 comments

Should the test cases in mocha or jasmine?

mallim avatar Jun 23 '13 11:06 mallim

I have been thinking about test suites, but I have to confess it's uncharted territory for me. Now that I know people want it, I perhaps should look into it further.

While I dig through tutorials, you're of course free to fork and create test cases of your own, I'd be glad to accept a pull request to that regard!

groenroos avatar Jun 23 '13 12:06 groenroos

But what is the test approach u like to adopt?

Here are a few options:

  • mocha? jasmine?
  • only need to do headless testing on phantomjs? Or need to support testing on cross browsers?

mallim avatar Jun 23 '13 13:06 mallim

I took a cursory look at both of the ones you suggested, and Jasmine seems like the better choice; it comes across as simpler (and simple is the keyword for this plugin), and while Mocha looks more robust, the plugin itself is not, so Jasmine seems to me the better fit.

Cross-browser support is important (and 0.9 will fix a lot in that regard), so I guess testing cross browsers is important? I really am a noob to test suites, so I don't feel confident I'm the best man to make this call...

groenroos avatar Jun 23 '13 13:06 groenroos

You might want to take a look at a setup in here: https://github.com/wyuenho/backgrid

  • The tests are written in jasmine (available under the test folder )
  • Test cases can be run on a browser manually
  • The test can also be run via grunt task via grunt-contrib-jasmine

mallim avatar Jun 23 '13 13:06 mallim

That looks pretty good to me; I'll have to dig deeper into that. Thanks for the link!

groenroos avatar Jun 24 '13 00:06 groenroos

Another example to follow - http://brandwatchltd.github.io/selleckt/demo/

mallim avatar Jul 10 '13 01:07 mallim