-
Notifications
You must be signed in to change notification settings - Fork 294
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
support the official vscode test API and Test Explorer (v1.59) #742
support the official vscode test API and Test Explorer (v1.59) #742
Conversation
Pull Request Test Coverage Report for Build 1141539487
💛 - Coveralls |
FYI, CI will fail until |
Works pretty nice on a newly updated vscode! I hope this gets released to the official channel soon. 👍 |
@connectdotz I have notice something When I save an It also does not change the status in the test explorer until the test are done. |
@distante your observation is accurate. The current sync point (between the jest runner and the explorer) is indeed when the test result is available, i.e. run is over. The editor and statusBar, on the other hand, could update status when the test "starts". Thus the discrepancy you saw... I wasn't sure if the difference is noticeable, well, now I know 😅 Let me see if we can close the gap... |
Unfortunately, I don't have any resources available, but I installed the RC and gave it a quick try. Looks nice so far! I also noticed something similar to distante: When the tests are finished, the green circled checkmarks appear. If one then removes a line within the file (without saving) and clicks onto the green checkmark, differently looking checkmarks appear: One at the test's old location and another one at the test's new location. If one saves the changes, everything is fine again. |
hmmm... looks like we ran out of the free credit in travis-ci.com... ok I guess it's time to move on to another CI system... @orta do you have any opinion? Looks like jest itself uses circle-ci, but that was before github actions... thoughts? [updated] |
meanwhile, I made some changes to address the comments:
|
During my brief test it worked quite nice!
|
@stephtr thanks for testing, are you on watch mode? |
Yes, exactly. |
I suspect it could be a jest watch issue, I think I have seen similar behavior before, the reverted file has timestamp equal or less than the committed file thus not triggering the test run... if you turn on the test explorer's output, you would probably see message like 'No tests found related to files changed since last commit.' If you get a chance, can you test executing explicit test from test explorer UI in a non-watch mode project in windows. These individual test run is new (in the past the we only supported file level test run), wanted to make sure it works for window users... |
You're completely right, it's really due to no changes since last commit. I just tested manual test execution in the test explorer, for me it is working fine! |
update for rc3: address part of #749, particularly about status not update until the run was completed. Even though the status did get updated (on the file level) during the run, @agos had a point that it is easy to miss it, especially when there are lots of tests within. rc3 will do a deep status update for "scheduled" and "started" tests so it should be a lot obvious now... FYI, also migrated our CI to github actions. |
…community#742) * implements vscode.tests API v1.59
The official test api and explorer are finally ready and should be released in v1.59. This PR aimed to support the test explorer via the new test API so we can offer the long-requested feature:
The explorer support is driven by the existing engine (mainly from
TestResultProvider
), therefore, completely backward compatible and all config and functionality behave exactly as before. The code change is mainly in the newtest-provider
folder, plus some minor code changes in the existing code to support more interactive test configurations from the explorer and notify the test-provider when jest test results changed.rc.1:
vscode-jest-4.1.0-rc.1.vsix.zip
updated rc.2:
vscode-jest-4.1.0-rc.2.vsix.zip
update rc3:
vscode-jest-4.1.0-rc.3.vsix.zip