-
Notifications
You must be signed in to change notification settings - Fork 105
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
9.0.0 removed qunit.log
callback
#207
Comments
(also grunt-contrib-qunit/docs/qunit-options.md Line 46 in a7ff5a3
qunit.log )
|
@vtintillier I would not expect a test to start failing if it takes the same amount of time but makes fewer assertions for some reason. The control mechanism for this inside QUnit is I understand that if you relied on this before, this is an extra change, but I think that is ultimately preferred in the long run. I suspect the main reason for a low bridge timeout is a desire for fast feedback. For example, if most of your tests are fast and don't use To achieve that effect, make sure You can then raise the bridge timeout to something sufficiently high so as to only be concerned about its main purpose, which is e.g. a crashed or non-starting browser. I hope the above two reasons show why it is seen as positive that the bridge timeout should not be used to detect individually slow tests. There are two issues that I would like to fix however:
|
Our only timeout for now is only in our
So is it possible for us to keep our "one log per assertion" output? |
I have not previously heard of this as a desired outcome. But, I don't mind at all adding it back in a minor release soon. That'd be no problem. In general, I recommend using the I do want to mention that QUnit has native support for data providers now. I have often seen that when long tests are written, it is often due to some level of automation or iteration happening inside of that test, which are perhaps arguably separate test cases. If that's the case for you, consider using QUnit.test.each(), which might address this problem for you. This also has the benefit of not having to manually compose assertion messages that incorporate each "case", offers per-case timeouts, offers per-case "re-run" in the browser interface, and more. Having said that, if you like how you have it, I'm happy to add it back. I removed it on the assumption that viable alternatives exist. When that isn't true, I have no reason to keep it removed. Thanks for reporting this! Can you share how you use this event, so that I can see how it fits in with the other output, and understand how it looks to developers using it? I might also add a test based on it. |
* Now as one parameter, matching the QUnit signature, instead of spread as positional parameters. https://qunitjs.com/api/callbacks/QUnit.log/ * Now with caveats documented in-code, and no longer promoted/recommended from the `summaryOnly` option docs. Ref #207
* Now as one parameter, matching the QUnit signature, instead of spread as positional parameters. https://qunitjs.com/api/callbacks/QUnit.log/ * Now with caveats documented in-code, and no longer promoted/recommended from the `summaryOnly` option docs. Ref #207
Thanks a lot for adding it back 👍 |
Thank you for pointing me to this. We were implementing this on our own for some test to look like JUnit parameterized tests, but this look much cleaner 👍 |
Hello @Krinkle
With the last release, we have 23c08c9 that removes the
qunit.log
event.We use it to output each assertion, to get a command line output similar to the browser output. It helps us better understanding when a test fails.
Another side effect is that for a long test with lots of assertions, we had frequent messages in the console, and thus the timeout check at
grunt-contrib-qunit/chrome/bridge.js
Lines 34 to 43 in a7ff5a3
qunit.log
event messages. But now, we need to set thetimeout
option to a duration bigger than our longest individual test, otherwise we get the timeout error:Did I miss an event I can use to replace
qunit.log
? If not, can we keep that in the bridge? Or is there another way to fix our issue?Thanks
The text was updated successfully, but these errors were encountered: