devcontainers / devcontainers/cli

test: findUserArg has no unit tests

未关闭 适合新手
#1,178 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
3k
派生
457
平均合并
13 小时 17 分钟
30 天内合并 PR
6

描述

`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?

贡献指南

打开贡献指南

调研方向

首先阅读 singleContainer.ts 中的 findUserArg,并查看附近测试所采用的约定。为列出的五种参数情况添加 src/test/singleContainer.test.ts,然后使用仓库现有的测试命令运行该测试文件。当每个预期的用户名或 undefined 结果都得到覆盖并通过时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
testing-qa
Issue 类型
重构
难度
1/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
描述清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。