-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
xit and xdescribe do not mark tasks as pending #784
Comments
Hello, I'm not sure what "pending" means but an |
Hi @cpojer, I guess it depends on how your feature parity is with the test runner you're using. Jasmine2 is the default test runner for the latest version of Jest. Jasmine2 and Jest handle
The above tests would pass under Jest, but when run under Jasmine2 they show up as pending, instead of passed. I've attached screenshots: Jasmine displays at the bottom 3 specs, 0 failures, 2 pending: While Jest displays at the bottom 3 tests passed: I believe this is a significant difference and should be addressed. There are times when you're working on a team and a set of tests are written up as text before any code is written, it's good to know how many tests are awaiting bodies. |
@mbrio I see. I wasn't aware of the difference between Jasmine's reporting and Jest's reporting. We never reported pending tests before (not even when Jasmine 1 was the default). Would you be interested in fixing the reporting around this so that at the end we say |
Ha! I'll check it out tomorrow, I'll see what I can do. |
Fixed by #788 |
Summary:As of Jasmine2 there is the possibility to determine whether a task is pending or not. This allows for those pending tasks to output with a custom yellow icon (\u25CB small white circle ○) in verbose mode and yellow pending information in the summary line. You can set tests as pending in Jasmine2 by using `xit()`, `xdescribe()`, `pending()`, or by not passing a function to `describe()`, `it()`, `pit()`, `fit()`, etc. ``` describe('AwesomeClass', () => { xit('going to write tests one day'); pit('going to write tests one day'); it('going to write tests one day'); fit('going to write tests one day'); }); ``` This can not work for Jasmine1 because it does not output the tasks with any form of pending information. fixes #784 Closes #788 Differential Revision: D3039885 fb-gh-sync-id: 3e502bb0af47c7e1854f4b7d2a277c7ec29ad102 shipit-source-id: 3e502bb0af47c7e1854f4b7d2a277c7ec29ad102
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I notice that the latest versions of Jest defaults to Jasmine 2 but for some reason xit and xdescribe do not mark tests as pending. Is this by design? Is there a way of writing pending tests?
The text was updated successfully, but these errors were encountered: