Switch from Jasmine to Mocha + Chai #117
Comments
Yeah. I guess we need to do that, sooner or later. Jasmine seems to be dead practically. Don’t know how much work the migration is, since I’m not as experienced with Mocha and Chai. I would be glad to see a pull request, thanks. |
Just throwing my support into this. I'm using Mocha for my server-side tests and I like the syntax and reporters. This will be a great opportunity to see how people structure front-end tests (I dont have much experience with those). |
I am using Mocha, Chai and Sinon with Chaplin already after I was reading the following post by Rob Dodson. Since Chaplin updated the requirejs version to 2.0.1, I am not able to run my tests because it somehow won't load in the right order anymore. So I'll have to fix that. |
@pabera just in case you didn't know — brunch with chaplin (commonjs version of chaplin-boilerplate + some additions) have mocha + chai + sinon tests already and ability to run it through command line. feel free to take stuff from there |
@paulmillr I know brunch - I like the whole idea of it too but since it does not use AMD over CommonJs, I did not use it .. I probably give it a try again some time but I started my projects the AMD way and it seemed to be a lot of work to switch. If I don't get those tests to work again, I'll be considering this anyway :) Thanks for your quick answer tough. |
Hmm, what’s the problem with RequireJS 2? Probably you’re missing the Seems like you’re relying on global variables, setting timeouts manually probably to wait for some modules to be loaded, and you’re using the deprecated priority configuration option. Sure, this practise is against a consistent m12n approach and may fail under specific circumstances. |
Thanks for your comment, unfortunately the concerns that you claimed to be the possible failure sources are my efforts to get all this to work. I do have proper dependencies throughout my chaplin application using requirejs 2 and it loads correctly by itself. But when it comes to testing I need to set up the environment correctly that works together with mocha, chai and so on. So settings timeouts, using priority where just ideas I came up.. Well but these personal issues do not belong to the actual issue report :) |
It has much nicer syntax, a lot of great reporters (like cov), it's supported (jasmine guys don't care about pull reqs) and much more.
I'll open a pull request with full syntax rewrite soon.
The text was updated successfully, but these errors were encountered: