devcontainers / devcontainers/cli
test: findUserArg has no unit tests
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 457
- Avg merge
- 13h 17m
- Merged PRs (30d)
- 6
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?
Contributor guide
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.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100