Comments (4)
The topic of testing with Syntax Tree nodes did come up in our group pairing session.
Just from how the fixtures appear right now (i.e. split on Node classes) then I believe this is the team's take:
The consensus is that we shouldn't couple our tests with Syntax Tree nodes because (depending on how we end up using the node fixtures) the node classes may change in the future which will impact the tests. On top of that, we want to test the code that Rubyists write in the wild, which may be different from how the node fixtures are set up.
would exercise all variants of the parser, so other versions of the parser could use it to validate behavior.
What do you mean by exercise all variants? If mean the fixtures end up being more "natural code", then our opinion would probably be different.
cc: @Shopify/ruby-dev-exp
from ruby-lsp.
The @Shopify/ruby-dev-exp team group-paired on this issue today.
We came up with a potential solution and this is the working branch: https://github.com/Shopify/ruby-lsp/tree/test-fixtures
However, we haven't reached a full consensus with regards to the best way to implement the tests.
Hey team, here's an idea since we all had different ideas about how we can improve the testing.
What if we each of us take a few hours before Monday to open a PR with a proof of concept of their approach so we can see the look & feel of each approach and use Monday morning to review all of them together and decide of which direction we're taking?
from ruby-lsp.
I'd be interested in extracting the node fixtures from the test suite into its own library. Because I'd like to use it not only in Syntax Tree but also in the Syntax Tree parser translator. I think this could be a useful addition to the ecosystem since it would exercise all variants of the parser, so other versions of the parser could use it to validate behavior.
If this is done, you could pull this in as a submodule for testing. Is that something that would work for y'all?
from ruby-lsp.
Proposal: #50
from ruby-lsp.
Related Issues (20)
- Windows CI is mis-reporting successful runs HOT 1
- Smoke test against a minimal Ruby project HOT 5
- Fix tests failing on Windows HOT 1
- Incorrect Folding for `else` HOT 6
- Exclude listeners based on registered capabilities
- Improve minitest detection accuracy
- LSP does not start when the Gemfile includes a private gem HOT 5
- Docs generated by RDoc should not display Sorbet magic comments HOT 2
- Error in Neovim LSP: `params` could be an array? HOT 4
- Migrate selection range HOT 1
- Explore a mechanism to allow for diagnostics extensions
- Allow more requests to be extended HOT 4
- Provide extensions with a logging abstraction
- Slack link requires updating
- CodeLens support for minitest spec-style tests
- An error occurred executing `ruby-lsp` HOT 4
- Unable to run the LSP before doing bundle install HOT 8
- Allow Code Lens features to be configured at a more granular level HOT 1
- OnTypeFormatting for pipe prevents to input closing block arguments
- Automatic setting of BUNDLE_GEMFILE fails on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-lsp.