Skip to content

docs: add TestContext#495

Merged
9aoy merged 3 commits intomainfrom
docs/TestContext
Aug 21, 2025
Merged

docs: add TestContext#495
9aoy merged 3 commits intomainfrom
docs/TestContext

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Aug 21, 2025

Summary

add TestContext doc.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings August 21, 2025 09:49
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 21, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 58653d3
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68a6ed7f0a8f9000082212cc
😎 Deploy Preview https://deploy-preview-495--rstest-dev.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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds documentation for the TestContext interface to the test API documentation. The changes improve type clarity by explicitly naming the context parameter and providing comprehensive documentation for the TestContext interface.

  • Updates type signatures to use explicit testContext: TestContext parameter naming instead of generic context
  • Adds new TestContext interface documentation with its properties and usage examples
  • Corrects the return type of expect.poll to include Promise<Assertion<T>>

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
website/docs/zh/api/test-api/test.mdx Adds TestContext documentation and updates type signatures in Chinese documentation
website/docs/zh/api/test-api/expect.mdx Corrects expect.poll return type to Promise in Chinese documentation
website/docs/en/api/test-api/test.mdx Adds TestContext documentation and updates type signatures in English documentation
website/docs/en/api/test-api/expect.mdx Corrects expect.poll return type to Promise in English documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

});

testWithUser('has user in context', ({ user, expect }) => {
testWithUser('has user in test context', ({ user, expect }) => {
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

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

[nitpick] The comment text was changed from 'context' to 'test context' but this appears to be an unnecessary change that doesn't improve clarity and creates inconsistency with the English version.

Suggested change
testWithUser('has user in test context', ({ user, expect }) => {
testWithUser('has user in context', ({ user, expect }) => {

Copilot uses AI. Check for mistakes.
@9aoy 9aoy merged commit 3389dc4 into main Aug 21, 2025
16 checks passed
@9aoy 9aoy deleted the docs/TestContext branch August 21, 2025 11:08
@9aoy 9aoy mentioned this pull request Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants