-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(cn): typo & translate in mocking.md #378
Conversation
✅ Deploy Preview for cn-vitest ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 575 need help!
guide/mocking.md
Outdated
@@ -534,7 +534,7 @@ vi.spyOn(exports, 'method').mockImplementation(() => {}) | |||
|
|||
- 模拟模块导出 class implementation | |||
|
|||
`vi.mock` and prototype 的示例: | |||
`vi.mock` 和原型配合的示例: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 原型 是不是保留 prototype 更好呢
guide/mocking.md
Outdated
original() // has original behaviour | ||
mocked() // is a spy function | ||
original() // 有原始的行为 | ||
mocked() // 是一个间谍函数 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
间谍 是不是保留 spy 更好呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我更多遵循你的建议吧,之前接触测试方面的概念比较少,有些点 get 不到,翻译的会比较生硬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啊!俺只是跟你商量看看是不是保留更好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为 spy 这种应该算是术语,我看 jest 是貌似是这样定义的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elonehoo 作为一个测试小白,不知道怎么跟你讨论这点。就像有人给 js 的 promise
翻译成 承诺
一样。代码写惯了的人一看,可能短时间还反应不过来。但是确实刚接触的人可能不知道这该不该翻译。翻译主要还是让大家看得顺眼就好。建议整理整理把翻译指南贴到 README 上吧,一开始我没找到,后面看到 issue 里面有点讨论,但是似乎还没定下来。像 spy 这种问颗,应该找专业测试的同学请教,讨论,定下来写到指南术语表里面就好啦。这样也能不断沉淀,不然后续翻译、校对工作都会纠结于一些重复没意思的问题,对双方都不好。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢!我周末去整理一下。
给你带来的任何不便,我表示歉意
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哪有哪有,没有你在这维护,我到现在都还没信心尝试写测试呢!感谢你的付出,为我们大大降低了门槛。我上面可能说的偏激了一点hh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有,确实你说的是对。我周末整理一下,我这几天摸鱼看看别人是咋定义的!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对不起,最近年底杂事多起来,不好意思,我明天摸鱼的时候会出指南术语表,实在不好意思
#391 不鸽了
这样可以吗 |
No description provided.