react-component / react-component/select

The tests in this repo silently fail type checking

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
482
Avg merge
15h 8m
Merged PRs (30d)
2

Description

Context:
While fixing https://github.com/react-component/select/issues/595 I noticed that the tests are not passing the TypeScript compiler, but nothing is catching that in the CICD pipeline. This is dangerous since the types are what help us to understand the use cases our users have. By making this change, we can prevent significant future bugs.

Proposal:
I will ensure that if there are any Typescript errors in the ./test directory, a PR can not merge. I will do this by updating the "test" script in package.json to look like:

    "test": "npm run type-check:tests && father test",
    "type-check:tests": "tsc -p ./tests/tsconfig.json --noEmit",

Is that acceptable?

Contributor guide

No contributing guide indexed for this repository

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 with package.json and the existing ./tests/tsconfig.json. Run the proposed TypeScript check with --noEmit, then run the current test command to confirm the check is included before the test suite. Done means TypeScript errors under ./test prevent the test script from succeeding and therefore block the CI merge check.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ci-cd, testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.