docs(snaps-jest): remove executionEnvironmentUrl / simulatorUrl from the docs - #4099
Open
boleklebovski wants to merge 1 commit into
Open
Conversation
executionEnvironmentUrl and simulatorUrl are not part of the environment options struct, so setting them has no effect. Signed-off-by: boleklebovski <160799963+boleklebovski@users.noreply.github.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.
Problem
The snaps-jest docs point people at two options that the package does not accept.
packages/snaps-jest/src/options.ts:12is the whole surface:There is no
executionEnvironmentUrland nosimulatorUrl. Yet:@exampleblock atsrc/options.ts:31shows"executionEnvironmentUrl": "http://localhost:8080"as atestEnvironmentOptionskey;README.md:544tells the reader that after disabling the built-in server they can "use theexecutionEnvironmentUrlandsimulatorUrloptions to configure the URLs of your own server".Both are dead ends. Setting either key is silently ignored, so someone who disables the built-in server on that advice has no documented way to point the environment anywhere, and the tests quietly carry on against the default.
Fix
Four lines across two files; no behaviour change.
Note
Issue #2181 reported this in February 2024 and is still open with no linked PR, so this should close it. I have kept the change to removing the incorrect claims rather than implementing the options, since whether those URLs should be configurable is a design question for you.
Note
Low Risk
README and JSDoc edits only; no runtime or configuration behavior changes.
Overview
Documentation-only fix so
@metamask/snaps-jestdocs match the realtestEnvironmentOptionssurface (server.enabled,server.port,server.rootonly).The JSDoc
@exampleinoptions.tsno longer shows a non-existentexecutionEnvironmentUrlkey. The README forserver.enabledno longer tells readers to configureexecutionEnvironmentUrlandsimulatorUrlwhen disabling the built-in server; it now says to disable the server and serve the snap bundle yourself.Reviewed by Cursor Bugbot for commit a67bc38. Bugbot is set up for automated code reviews on this repo. Configure here.