Skip to content

docs: add note for describe.skip#446

Merged
9aoy merged 3 commits intomainfrom
docs/describe.skip
Aug 6, 2025
Merged

docs: add note for describe.skip#446
9aoy merged 3 commits intomainfrom
docs/describe.skip

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Aug 5, 2025

Summary

The skip tag is only used to skip test cases, and the code inside the describe block will still be executed.

describe.skip('a', () => {
  console.log('will run');
  test('b', () => {
    console.log('will not run');
    expect(0).toBe(0);
  });
});

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings August 5, 2025 08:55
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 clarifying documentation about the behavior of describe.skip in both English and Chinese documentation files. The key clarification is that while test cases are skipped, the code inside the describe block still executes.

  • Added explanation that describe.skip only skips test cases, not the entire describe block execution
  • Updated section titles and descriptions to be more precise about what gets skipped
  • Added code examples demonstrating the execution behavior

Reviewed Changes

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

File Description
website/docs/zh/api/test-api/describe.mdx Updated Chinese documentation with clarified behavior and example
website/docs/en/api/test-api/describe.mdx Updated English documentation with clarified behavior and example

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 5, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 423cbab
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/6891c6f5c4170f000971d4e2
😎 Deploy Preview https://deploy-preview-446--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.

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 5, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit b027275
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/6891c83ec4170f000971f6d4
😎 Deploy Preview https://deploy-preview-446--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.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@njzydark
Copy link
Copy Markdown
Contributor

njzydark commented Aug 5, 2025

If I want to prevent test code from executing, are there related APIs that can achieve this? Like .todo?

@9aoy
Copy link
Copy Markdown
Collaborator Author

9aoy commented Aug 5, 2025

If I want to prevent test code from executing, are there related APIs that can achieve this? Like .todo?

None at the moment.

@9aoy 9aoy merged commit 6ef8588 into main Aug 6, 2025
16 checks passed
@9aoy 9aoy deleted the docs/describe.skip branch August 6, 2025 03:03
@9aoy 9aoy mentioned this pull request Aug 6, 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.

3 participants