Code Monkey home page Code Monkey logo

Comments (4)

wildmaples avatar wildmaples commented on May 31, 2024 1

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.

wildmaples avatar wildmaples commented on May 31, 2024

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.

@Morriar:

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.

kddnewton avatar kddnewton commented on May 31, 2024

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.

Morriar avatar Morriar commented on May 31, 2024

Proposal: #50

from ruby-lsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.