Skip to content

Nock#67

Merged
YasharF merged 0 commit into
masterfrom
nock
Jun 9, 2026
Merged

Nock#67
YasharF merged 0 commit into
masterfrom
nock

Conversation

@YasharF

@YasharF YasharF commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Checklist

  • I acknowledge that submissions that include copy-paste of AI-generated content taken at face value (PR text, code, commit message, documentation, etc.) most likely have errors and hence will be rejected entirely and marked as spam or invalid
  • I manually tested the change with a running instance, DB, and valid API keys where applicable
  • Added/updated tests if the existing tests do not cover this change
  • README or other relevant docs are updated
  • --no-verify was not used for the commit(s)
  • npm run lint passed locally without any errors
  • npm test passed locally without any errors
  • npm run test:e2e:replay passed locally without any errors
  • npm run test:e2e:custom -- --project=chromium-nokey-live passed locally without any errors
  • PR diff does not include unrelated changes
  • PR title follows Conventional Commits — https://www.conventionalcommits.org/en

Description

Screenshots of UI changes (browser) and logs/test results (console, terminal, shell, cmd)

Copilot AI review requested due to automatic review settings June 8, 2026 13:46

Copilot AI left a comment

Copy link
Copy Markdown

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 replaces the prior server-side fetch/axios fixture approach with a nock-based record/replay system intended to make Playwright E2E runs deterministic, while also updating E2E tests/docs and adjusting dependencies/patches to support the new interception behavior.

Changes:

  • Introduces a new server-side nock record/replay installer and wires it into the Playwright webserver startup.
  • Removes the legacy fixture modules/manifest and deletes existing recorded fixtures.
  • Updates E2E tests and testing documentation, plus bumps/patches dependencies used by the new fixture system.

Reviewed changes

Copilot reviewed 42 out of 46 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
test/tools/start-with-memory-db.js Switches test webserver startup to install the new nock-based fixture system.
test/tools/server-fetch-fixtures.js Removes legacy fetch monkey-patch fixture system.
test/tools/server-axios-fixtures.js Removes legacy axios interceptor fixture system.
test/tools/nock-server-fixtures.js Adds nock-based record/replay installer with scrubbing and fixture loading.
test/tools/fixture-helpers.js Removes legacy fixture helper utilities and manifest support.
test/TESTING.md Updates testing/fixture documentation to describe the new nock workflow.
test/fixtures/GET_https%3A%2F%2Fwww.alphavantage.co%2Fquery%3Ffunction%3DTIME_SERIES_DAILY%26symbol%3DMSFT%26outputsize%3Dcompact.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fpubchem.ncbi.nlm.nih.gov%2Frest%2Fpug%2Fcompound%2Fcid%2F2244%2Fsynonyms%2FJSON.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fpubchem.ncbi.nlm.nih.gov%2Frest%2Fpug%2Fcompound%2Fcid%2F2244%2FJSON.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fen.wikipedia.org%2Fw%2Fapi.php%3Faction%3Dquery%26format%3Djson%26origin%3D_%26prop%3Dpageimages%257Cpageterms%26titles%3DNode.js%26pithumbsize%3D400.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fen.wikipedia.org%2Fw%2Fapi.php%3Faction%3Dquery%26format%3Djson%26origin%3D_%26prop%3Dextracts%26explaintext%3D1%26titles%3DNode.js%26exintro%3D1.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fen.wikipedia.org%2Fw%2Fapi.php%3Faction%3Dquery%26format%3Djson%26origin%3D_%26list%3Dsearch%26srsearch%3Djavascript%26srlimit%3D10.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fen.wikipedia.org%2Fw%2Fapi.php%3Faction%3Dparse%26format%3Djson%26origin%3D_%26page%3DNode.js%26prop%3Dsections.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fapi.trakt.tv%2Fmovies%2Ftrending%3Flimit%3D6%26extended%3Dimages.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fapi.trakt.tv%2Fmovies%2Fmercy-2026%3Fextended%3Dfull%252Cimages.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fapi.nytimes.com%2Fsvc%2Fbooks%2Fv3%2Flists%2Fcurrent%2Fyoung-adult-hardcover.json.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fapi.github.com%2Frepos%2Fsahat%2Fhackathon-starter%2Fstargazers%3Fper_page%3D10.json Deletes legacy JSON response fixture.
test/fixtures/GET_https%3A%2F%2Fapi.github.com%2Frepos%2Fsahat%2Fhackathon-starter.json Deletes legacy JSON response fixture.
test/fixtures/fixture_manifest.json Removes legacy manifest used to skip tests when fixtures weren’t recorded.
test/e2e/twilio.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e/trakt.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e/rag.e2e.test.js Updates skip behavior in record/replay mode due to pipeline complexity.
test/e2e/nyt.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e/lob.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e/llm-classifier.e2e.test.js Removes old fixture/manifest + rate-limit retry logic and configures suite to run serially.
test/e2e/here-maps.e2e.test.js Updates skip logic for record/replay mode and configures suite to run serially.
test/e2e/google-maps.e2e.test.js Updates skip logic for record/replay mode and configures suite to run serially.
test/e2e/giphy.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e/foursquare.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e/chart.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e-nokey/wikipedia.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e-nokey/theme.e2e.test.js Removes old fixture skip/manifest logic.
test/e2e-nokey/scraping.e2e.test.js Removes old fixture skip/manifest logic.
test/e2e-nokey/pubchem.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
test/e2e-nokey/lastfm.e2e.test.js Removes old record/replay skip logic and configures suite to run serially.
test/e2e-nokey/github-api.e2e.test.js Removes old fixture skip/manifest logic and configures suite to run serially.
patches/@mswjs+interceptors+0.41.9.patch Adds patch-package changes to msw interceptors used by nock to address HTTP/version + brotli handling.
package.json Adds secret scrubbing + nock, updates Playwright alpha and mocha version.
package-lock.json Updates lockfile for new/updated dependencies.
.github/dependabot.yml Ignores nock updates in Dependabot configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/tools/nock-server-fixtures.js Outdated
Comment thread test/tools/nock-server-fixtures.js
Comment thread test/tools/nock-server-fixtures.js
Comment thread test/tools/nock-server-fixtures.js Outdated
Comment thread test/tools/nock-server-fixtures.js
Comment thread test/TESTING.md Outdated
Comment thread test/TESTING.md Outdated
Comment thread test/TESTING.md
Comment thread test/TESTING.md Outdated
Comment thread test/tools/nock-server-fixtures.js Outdated
@YasharF YasharF force-pushed the nock branch 7 times, most recently from d7e1132 to c91f492 Compare June 9, 2026 05:43
@YasharF YasharF merged commit c91f492 into master Jun 9, 2026
7 checks passed
@YasharF YasharF deleted the nock branch June 9, 2026 05:53
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.

2 participants