typescript-eslint / typescript-eslint/ts-api-utils

🧪 Tests: Add tests for remaining functions in src/nodes

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: testing good first issue status: accepting prs
Dominant language
TypeScript
Stars
122
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Bug Report Checklist
  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.
Overview

#6 added a first round of unit tests. Let's add some more tests! 🙌

The src/nodes folder is not yet fully tested. This issue tracks adding in tests for the rest of its exported functions.

Additional Info

See #6 for examples of tests: including those that work with AST nodes and/or type checking.

There might be existing tests in https://github.com/ajafff/tsutils that are relevant here. If you do find them, it's fine to copy & paste them over - as long as there's a comment like this above any area of copy & pasted code (or on top of a file if the entire file is copy & pasted):

// Code largely based on https://github.com/ajafff/tsutils
// Original license: https://github.com/ajafff/tsutils/blob/26b195358ec36d59f00333115aa3ffd9611ca78b/LICENSE

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the exported functions in src/nodes and the existing test examples from #6. Check tsutils for relevant tests and preserve the specified attribution when reusing code. Done means the remaining exported functions in src/nodes have unit-test coverage, including AST-node and type-checking cases where relevant.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.