Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

test: findUserArg has no unit tests

Open Beginner friendly
#1,178 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
testing-qa

Research direction

Start by reading findUserArg in singleContainer.ts and reviewing nearby test conventions. Add src/test/singleContainer.test.ts for the five listed argument cases, then run that test file using the repository's existing test command. Done means each expected username or undefined result is covered and passes.

Written by the indexing model from the issue text.

Description

findUserArg in singleContainer.ts is exported but has no test coverage.
No test file currently imports from singleContainer.

Proposing to add src/test/singleContainer.test.ts covering these cases:

  • ['-u', 'myuser'] -> 'myuser'
  • ['--user', 'myuser'] -> 'myuser'
  • ['--user=myuser'] -> 'myuser'
  • ['--user', 'a', '-u', 'b'] -> 'b' (last wins)
  • [] -> undefined

Would this be helpful?

Dominant language
TypeScript
Stars
3k
Forks
461
Avg merge
18m
Merged PRs (30d)
5

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.

More from devcontainers/cli

All issues in devcontainers/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.