Skip to content

docs(snaps-jest): remove executionEnvironmentUrl / simulatorUrl from the docs - #4099

Open
boleklebovski wants to merge 1 commit into
MetaMask:mainfrom
boleklebovski:docs/remove-nonexistent-snaps-jest-options
Open

docs(snaps-jest): remove executionEnvironmentUrl / simulatorUrl from the docs#4099
boleklebovski wants to merge 1 commit into
MetaMask:mainfrom
boleklebovski:docs/remove-nonexistent-snaps-jest-options

Conversation

@boleklebovski

@boleklebovski boleklebovski commented Aug 12, 2026

Copy link
Copy Markdown

Problem

The snaps-jest docs point people at two options that the package does not accept.

packages/snaps-jest/src/options.ts:12 is the whole surface:

const SnapsEnvironmentOptionsStruct = type({
  server: defaulted(
    object({
      enabled: defaulted(boolean(), true),
      port: defaulted(number(), 0),
      root: defaulted(string(), process.cwd()),
    }),
    {},
  ),
});

There is no executionEnvironmentUrl and no simulatorUrl. Yet:

  • the @example block at src/options.ts:31 shows "executionEnvironmentUrl": "http://localhost:8080" as a testEnvironmentOptions key;
  • README.md:544 tells the reader that after disabling the built-in server they can "use the executionEnvironmentUrl and simulatorUrl options 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

  • drop the phantom key from the JSDoc example;
  • reword the README sentence so it no longer promises options that do not exist.

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-jest docs match the real testEnvironmentOptions surface (server.enabled, server.port, server.root only).

The JSDoc @example in options.ts no longer shows a non-existent executionEnvironmentUrl key. The README for server.enabled no longer tells readers to configure executionEnvironmentUrl and simulatorUrl when 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.

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>
@boleklebovski
boleklebovski requested a review from a team as a code owner August 12, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant