devcontainers / devcontainers/cli

test: findUserArg has no unit tests

Open
#1,178 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.