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

doc: cover --experimental-test-module-mocks flag #55021

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

textbook
Copy link

As I discovered answering this Stack Overflow question, node:test's mock.module is currently hidden behind the --experimental-test-module-mocks flag. This was covered on the CLI page, but not the test runner page.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem. labels Sep 19, 2024
Comment on lines +2089 to +2092
prior to mocking are not impacted. In order to enable module mocking, Node.js must
be started with the [`--experimental-test-module-mocks`][] command-line flag.

The following example demonstrates how a mock is created for a module.
Copy link
Member

@RedYetiDev RedYetiDev Sep 19, 2024

Choose a reason for hiding this comment

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

IIRC any conditions for this belong in the stability blockquote

@RedYetiDev RedYetiDev added the experimental Issues and PRs related to experimental features. label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. experimental Issues and PRs related to experimental features. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants