-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Question: can mocha dependency be upgraded? #206
Comments
I know there's no real security concern because this is a development plugin; but in the name of keeping warnings channels tidy so they don't get ignored, this package is noisy on a couple of npm warning outputs now.
And the deprecation warnings produced by installing the package:
I'm not sure what other incentives there are to upgrading the mocha dependency but maybe if we start listing them here it will give a clearer picture of the benefits of doing the upgrade. |
@apellerano-pw don't get me wrong, I would love to update. but last time I tried I couldn't find a way to support the "old testing APIs" with the newer Mocha releases. fortunately we have the new testing APIs now that should work with the newer Mocha, but we'd have to drop support first before upgrading Mocha. |
Ah, that's bittersweet. It will probably take a while for dropping support to make sense and doing it earlier would strand ppl on the 0.14.x line. But at least something is in motion. Do you know exactly what the issue is with getting old testing apis working with newer mocha? Is it something other people could take a stab at? |
@apellerano-pw the specific issue is https://github.com/emberjs/ember-mocha/blob/master/vendor/ember-mocha/ember-mocha-adapter.js, which allows the "implicit async helper chaining tests" where you use |
@Turbo87 I've been messing around with mocha@3 in this project. I'm still a little confused as to exactly what is holding back the upgrade, likely because I'm new to this project. Here's what I've observed so far:
Is there some combination of these issues holding back the upgrade? An example of a test in this project that fails under mocha@3 but is supposed to pass would be a helpful place to start. btw here is the changes I made to context.it.only = function(title, fn){
var test = context.it(title, fn);
// old and busted
//mocha.grep(test.fullTitle());
// new hotness
test.parent._onlyTests = test.parent._onlyTests.concat(test);
mocha.options.hasOnly = true;
}; I assume something similar could be done for context.describe.only = function(title, fn){
var suite = context.describe(title, fn);
suite.parent._onlySuites = suite.parent._onlySuites.concat(suite);
mocha.options.hasOnly = true;
}; |
I have it working and tested with the new For the overspecification issue, I made every At this point I believe I have ember-mocha working with mocha@3. Do you have any additional test cases that might fail in mocha@3? How I silenced function invoke(context, fn, d) {
done = d;
isPromise = false;
- var result = fn.call(context);
+ // In case fn expects a done hook, stub it
+ var result = fn.call(context, function () {}); context.it = context.specify = function(title, fn){
var suite = suites[0], test;
if (suite.pending) {
fn = null;
}
- if (!fn || fn.length === 1) {
+ if (!fn) { |
@a13o Where are you getting access to I'm looking for a way to do it without making a new Mocha interface e.g. edit: looks like I can do this in |
@jasonworden I think this repo has updated a bunch since I was last looking into this issue. My old PR is still viewable here: #216 There was a I see you've since found it in your edit, just wanted to provide any addtl context I could (no pun intended) |
Two years later, growl is still showing up as a critical vulnerability. I guess we won't remediate it since this is a dev dependency. |
I'm curious if we can upgrade mocha to
"^5.1.1"
instead of"mocha": "^2.5.3"
?I tried out (with npm-link) using the latest mocha and tests worked fine.
The text was updated successfully, but these errors were encountered: