Skip to content
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

Merged
merged 3 commits into from
Jan 10, 2024
Merged

Conversation

yionr
Copy link
Contributor

@yionr yionr commented Jan 10, 2024

No description provided.

Copy link

netlify bot commented Jan 10, 2024

Deploy Preview for cn-vitest ready!

Name Link
🔨 Latest commit 422e6dc
🔍 Latest deploy log https://app.netlify.com/sites/cn-vitest/deploys/659e3d84f00bc000084dd3c2
😎 Deploy Preview https://deploy-preview-378--cn-vitest.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor Author

@yionr yionr left a 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` 和原型配合的示例:
Copy link
Member

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() // 是一个间谍函数
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

间谍 是不是保留 spy 更好呢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我更多遵循你的建议吧,之前接触测试方面的概念比较少,有些点 get 不到,翻译的会比较生硬

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

啊!俺只是跟你商量看看是不是保留更好

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为 spy 这种应该算是术语,我看 jest 是貌似是这样定义的

Copy link
Contributor Author

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 这种问颗,应该找专业测试的同学请教,讨论,定下来写到指南术语表里面就好啦。这样也能不断沉淀,不然后续翻译、校对工作都会纠结于一些重复没意思的问题,对双方都不好。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢!我周末去整理一下。
给你带来的任何不便,我表示歉意

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哪有哪有,没有你在这维护,我到现在都还没信心尝试写测试呢!感谢你的付出,为我们大大降低了门槛。我上面可能说的偏激了一点hh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有,确实你说的是对。我周末整理一下,我这几天摸鱼看看别人是咋定义的!

Copy link
Member

@elonehoo elonehoo Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对不起,最近年底杂事多起来,不好意思,我明天摸鱼的时候会出指南术语表,实在不好意思

#391 不鸽了

@elonehoo
Copy link
Member

elonehoo commented Jan 10, 2024

whatever suites you from first two examples

前两个例子中有非常适合你的

这样可以吗

@elonehoo elonehoo merged commit 2a4be1a into vitest-dev:dev Jan 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants