-
Notifications
You must be signed in to change notification settings - Fork 182
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
Add discover tests custom request #3180
Conversation
How to use the Graphite Merge QueueAdd the label graphite-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
b31b6f4
to
86b8fe1
Compare
86b8fe1
to
1290c28
Compare
dfcc5be
to
b80e1d8
Compare
1290c28
to
7676523
Compare
b80e1d8
to
90ea02f
Compare
e9cbf36
to
debbee7
Compare
1170bf3
to
4760446
Compare
debbee7
to
675fbff
Compare
4760446
to
8f68f57
Compare
8f68f57
to
8dcf69e
Compare
675fbff
to
aff14cb
Compare
8dcf69e
to
f4582ce
Compare
3c2c02a
to
f5093ce
Compare
f4582ce
to
dcd90c6
Compare
f5093ce
to
44a38fa
Compare
dcd90c6
to
4e5dceb
Compare
Merge activity
|
### Motivation Closes #3171 Add a new custom request to discover tests in a specific document. This request will instantiate all listeners and collect all of the discovered groups and examples as test items for the editor. ### Implementation - Created the new request - Implement a listener dedicated to the test style syntax only (spec will be a separate listener) - Ensured to use ancestor linearization to determine the test framework ### Automated Tests Added tests.
4e5dceb
to
7d66850
Compare
* Add discover tests custom request (#3180) ### Motivation Closes #3171 Add a new custom request to discover tests in a specific document. This request will instantiate all listeners and collect all of the discovered groups and examples as test items for the editor. ### Implementation - Created the new request - Implement a listener dedicated to the test style syntax only (spec will be a separate listener) - Ensured to use ancestor linearization to determine the test framework ### Automated Tests Added tests. * Resolve test items with server request (#3186) ### Motivation Closes #3173 Start firing our new custom request to discover which tests are available in a given file. ### Implementation We fire the request and then recursively add test items to their respective collections. If a document is saved, we check to see if we created a test item for it and then we clear its children (the tests defined inside of the file) and re-trigger the request. I chose to use on save because on change would put a lot of pressure on the server. ### Automated Tests Added tests. --------- Co-authored-by: vinistock <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had started reviewing before it was merged but there's nothing critcal.
|
||
sig { params(node: Prism::ClassNode).void } | ||
def on_class_node_enter(node) | ||
@visibility_stack << :public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to use symbols here rather than VisibilityScope
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's what we were using before in the original implementation in code lens. I think the bigger refactor here is realizing that many listeners need to keep track of scopes, so maybe we can implement our own Prism::Dispatcher
subclass that automatically tracks this, so that we don't need to duplicate the logic in multiple places.
end | ||
def initialize(response_builder, global_state, dispatcher, uri) | ||
@response_builder = response_builder | ||
@global_state = global_state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like ivar is unused?
Motivation
Closes #3171
Add a new custom request to discover tests in a specific document. This request will instantiate all listeners and collect all of the discovered groups and examples as test items for the editor.
Implementation
Automated Tests
Added tests.