-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Mocha #1479
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
Conversation
|
This can also include less packaged javascript if we're okay with requiring people to run |
| }); | ||
|
|
||
| expect.Assertion.prototype.near = function(expected, delta) { | ||
| delta = 0 || 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 || 10 — that's weird... Why isn't the default value 1.0E-12 like above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be made lower again - as noted in the PR, these tests were all broken before and weren't running.
|
I think we're OK with The broken tests are a surprise, any idea why they weren't running or reporting any fails? |
The projection tests were |
|
Oops... Looks like I haven't looked at it for a while. |
|
BTW, @tmcw is coverage behavior the same in the master branch, without the changes? |
|
I created a simple benchmark that exhibits the same slowdown going from jasmine -> mocha as observed here. Pretty sure this is due to the different event loop implementations they use -- mocha is limited by the latency of |
|
I got a performance patch merged to mocha... and it's quite a bit faster in Chrome, but |
|
Awesome work John! Any clues why it's still slow when running through Testacular/PhantomJS? |
|
Turns out we were using an old version of mocha bundled with testacular/karma. Replaced that with mocha 1.9.0 and now it's down to 2x slower than jasmine. |
|
OK, lets go! |
|
@jfirebaugh oops, it seems that test coverage doesn't work now — the reports are empty. :( Although I definitely remember it working with Mocha at some time on this pull. Tried replacing Mocha back to bundled one, no luck. Could you take a quick look? |
|
OK, tracked it down with git bisect — coverage broke after |
|
Can't figure out why it could possibly break it so reported an issue: karma-runner/karma#461 |
|
Figured it out, now everything works :) |
* master: fix coverage reporting in Karma #1479, close karma-runner/karma#461 Update specs for mocha Manage mocha dependency with npm; update to 1.9.0 Update mocha.js remove testacular master hack (as 0.6 is now stable) Proper default for delta Tighter tolerance for point-near check Fix mercator tests, these are broken in Leaflet master. Use mocha testacular -> karma remove testacular master hack (as 0.6 is now stable) Update deps.js Strage behavior of inplace github editor Remove trailing whitespace in fix Extend L.Util.template Popup close button bugfix
Replaces jasmine with Mocha, Expect.js (matchers), and Sinon (spies).
Also:
Right now
--covreports on everything but Leaflet here - not sure what's going on there.