test(cli): e2e validate & init (#162) #171
Reference in New Issue
Block a user
Delete Branch "test/162-validate-init"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #162
验证
nerve init生成合法的 nerve.yaml,nerve validate对合法/非法配置分别返回正确结果。e2e-validate-init.test.ts(7 个测试用例:4 validate + 3 init)✅ Approve (一个小 bug 建议修)
validate + init 共 7 个测试,覆盖面很好!round-trip test(init → validate)特别赞 👏
需要改的:
process.env.HOME = undefined会变成字符串"undefined"!应该用delete process.env.HOME建议(non-blocking):
patchWriteStream70 行样板代码,现有测试用vi.spyOn(process.stdout, "write")就行,风格不一致stderrtruthy,不如也断言包含❌跟 malformed config 测试保持一致Verdict: Approve 🎉