Skip to content

Testing tree-sitter queries #95

@vitallium

Description

@vitallium

Description

Craft unit tests for the outline.scm file to validate that tree-sitter queries accurately identify and capture the appropriate syntax nodes for symbols outlines in Ruby.

Proposal

Start with outlines.scm queries and then expand to other queries. All tests should be part of the CI pipeline.

describe "User model" do
# ^ @item
#   ^ @name
  context "when user is valid" do
  # ^ @item
  #       ^ @name
    it "saves successfully" do
    # ^ @item
    #    ^ @name
      # test implementation
    end
  end
end

test "valid user creation" do
# ^ @item
#     ^ @name
  # test implementation
end

Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions