doc: cover --experimental-test-module-mocks flag#55021
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Sep 21, 2024
Merged
doc: cover --experimental-test-module-mocks flag#55021nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
avivkeller
reviewed
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. |
Member
There was a problem hiding this comment.
IIRC any conditions for this belong in the stability blockquote
Contributor
Author
There was a problem hiding this comment.
I tried to make this consistent (within the test docs page, at least); other examples using experimental flags, neither of which does so in the blockquote:
- https://nodejs.org/api/test.html#snapshot-testing (I based the sentence I added on this); and
- https://nodejs.org/api/test.html#collecting-code-coverage
cjihrig
approved these changes
Sep 20, 2024
lpinca
approved these changes
Sep 20, 2024
MoLow
approved these changes
Sep 20, 2024
atlowChemi
approved these changes
Sep 20, 2024
jasnell
approved these changes
Sep 21, 2024
Collaborator
|
Landed in 5e25c2a |
targos
pushed a commit
that referenced
this pull request
Oct 4, 2024
PR-URL: #55021 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
louwers
pushed a commit
to louwers/node
that referenced
this pull request
Nov 2, 2024
PR-URL: nodejs#55021 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com>
tpoisseau
pushed a commit
to tpoisseau/node
that referenced
this pull request
Nov 21, 2024
PR-URL: nodejs#55021 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As I discovered answering this Stack Overflow question,
node:test'smock.moduleis currently hidden behind the--experimental-test-module-mocksflag. This was covered on the CLI page, but not the test runner page.