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
Using pending causes custom Configuration hooks not to run #490
Comments
It screwed my code formatting up for some reason. |
To Quick, a pending test isn't actually a test at all, just a placeholder for one. beforeEach and afterEach are called for each test, but there aren't any tests in your example, resulting in an empty test suite. |
OK, understood. The only possible confusing thing then is the way Quick prints pending tests. Here is what is printed to the console in my scenario. Pending: it will throw a MissingTableName exception Since it only prints the text of the pending item, it's somewhat confusing. If I define lots of pending tests at first, which I commonly do, and some or many have similar pending descriptions, then it looks like things get duplicated since nothing else is printed. I realize this is relatively minor. Would it be your suggestion then to use unique pending descriptions so as to provide additional context on exactly what is pending? |
I see, interesting. I imagine Quick should be constructing the full test name (including description/context strings) when printing the statements about the pending tests. That would clarify things, right? |
I think it would. I was trying to do something similar with the hooks, but since they don't run, I'm unable to construct a meaningful description of pending tests. I was attempting to do something like this:
|
Well I can't seem to get my formatting correct using Markdown. Each line is supposed to be indented properly. But, hopefully you get the idea. |
I think pending examples could be vastly improved.
Would the following work for pending examples?
|
I think that's great. I think it's a nice improvement and provides more context. I also like the idea that pending examples would be expected failures. I'm guessing that means that what I was originally asking for would happen. That is, pending would also have beforeSuite/afterSuite and beforeEach/afterEach run in custom configurations? The net of what I'm trying to accomplish may come when reporters land, but until then I'm using these custom configuration hooks to generate nice output when the run is complete. |
May i work with this issue? |
Of course, @takecian! Please post any questions you have here, if you get stuck trying to figure things out on your own. 👍
I think this is a good place to start. You'll need to find the spot where we |
I created PR for this issue. At first I started with,
It would be appreciate for any feedback. |
@modocache, if you have spare time, it would be helpful that you review this PR(#491). 👍 |
@modocache , @briancroom hi, is it possible to review PR(#491)? |
I will review your PR soon, @takecian. |
This is not resolved yet actually. |
If you create a custom Configuration class and add your own custom closures for:
beforeSuite,
afterSuite,
beforeEach
afterEach
and then use pending (instead of it/xit/fit) on your Quick tests, none of the configuration closures for beforeEach and afterEach are called, beforeSuite or afterSuite are called.
I typically begin my testing by writing out my describe/context(s) and use pending on everything. When I run a test with ALL pending and no it/xit/fit, none of the hooks are invoked.
Here is a very simple example of what I'm talking about:
FWIW, I have not tested what happens when I have tests with a mix of pending/it, so I don't know what happens there.
The text was updated successfully, but these errors were encountered: