slightlyoff / cassowary.js

Cassowary/JS, better, faster, future-ready
Other
1.69k stars 107 forks source link

Switch from Mocha to Intern #39

Closed bitpshr closed 11 years ago

bitpshr commented 11 years ago

After checking out the cassowary.js tests, I noticed there were a few hacks to get Mocha to behave properly. Further, it didn't have true standalone browser support, a way to easily test against all browsers, or a way to generate code coverage. I also was extremely bored and had to kill some time today, so I decided to switch the tests to use Intern instead.

slightlyoff commented 11 years ago

Heya,

This is badass! I really loathed Mocha by the time I was done hacking it all into place. Any chance you can rebase? Else, I'm happy to do the merge manually. Either way, thank you SO much for the outstanding contribution.

bitpshr commented 11 years ago

No problem at all! I will rebase and also bring Intern up to the latest version.

bitpshr commented 11 years ago

This should be good to go. A few notes:

If any conflicts arise with the merge or if anything looks off, let me know and I'll do my best to take care of it.

asolove commented 11 years ago

@bitpshr: the failing test used to pass, but is also very delicate. I will work on a more resilient version. I don't think it has anything to do with your changes except that the code is being run in a different context.

slightlyoff commented 11 years ago

Merged. We can fix in trunk.

HUGE kudos to you @bitpshr. WELL PLAYED.

bitpshr commented 11 years ago

All this means is I need a life. I am glad to have helped out a bit with cassowary!

slightlyoff commented 11 years ago

Ok, I'm not seeing any logic in api.js for change tracking, which I think just means this test is predicting the future, not testing the current state. Commenting it out and moving on.

asolove commented 11 years ago

@slightlyoff: it's in there at https://github.com/slightlyoff/cassowary.js/blob/master/src/parser/api.js#L67 and the test was passing until this PR but is very unstable because we aren't clearing out the state of the solver behind the parser api when the test runs. I'm working on a fix.

slightlyoff commented 11 years ago

Aaaaaaahhhhhh...OK.

We should perhaps chat about that API in another issue = )

asolove commented 11 years ago

Yeah no one was super happy with it, the old discussion is at https://github.com/slightlyoff/cassowary.js/pull/35.