Skip to content

Conversation

@zero-years
Copy link
Contributor

在提交PR之前,请确保您执行以下操作:

  • 曾阅读过翻译须知
  • 检查是否已经有PR以同样的方式解决问题,以避免创建重复。
  • 在此PR中描述正在解决的问题,或引用它解决的问题(例如:fixes #123)。

描述

翻译 guide/browser/assertion-api 中缺少翻译的内容 @NoiseFan

附加上下文

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for cn-vitest ready!

Name Link
🔨 Latest commit 1b49943
🔍 Latest deploy log https://app.netlify.com/projects/cn-vitest/deploys/6937030358b01200083ecee2
😎 Deploy Preview https://deploy-preview-832--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 project configuration.

@NoiseFan NoiseFan changed the title Docs(guide/browser/assertion): translate guide/browser/assertion-api docs(cn): translate guide/browser/assertion-api Dec 8, 2025
function toBeInViewport(options: { ratio?: number }): Promise<void>
```

This allows you to check if an element is currently in viewport with [IntersectionObserver API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).
Copy link
Collaborator

Choose a reason for hiding this comment

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

一段文字后面的标点符号不要丢掉。它将示意当前句子结束。

允许你通过 [IntersectionObserver API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) 检查元素是否在当前视口中。

You can pass `ratio` argument as option, which means the minimal ratio of the element should be in viewport. `ratio` should be in 0~1.
你可以通过参数 `ratio`,将视口中元素的最小比例设置为 `ratio``ratio` 的取值范围为 0~1
Copy link
Collaborator

Choose a reason for hiding this comment

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

连续的符号,无需使用空行隔离开

@NoiseFan
Copy link
Collaborator

NoiseFan commented Dec 8, 2025

提出的问题已解决。

@NoiseFan NoiseFan merged commit 4d6fee7 into vitest-dev:dev Dec 8, 2025
5 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