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

Brody/mocking setup #1726

Closed
wants to merge 15 commits into from
Closed

Brody/mocking setup #1726

wants to merge 15 commits into from

Conversation

BrodyHughes
Copy link
Member

@BrodyHughes BrodyHughes commented Oct 9, 2024

This PR sets up mocking for swaps endpoints in our e2e flow. This will require a swaps SDK bump which is in progress.

Changes:

  • @derHowie made some changes to e2e to help unblock running the flows locally so we could expose the swaps responses. These changes are the modifications made directly to the test files. Some swap routes began to block the default hardhat wallet and address changes were made there as well as some flaky flows were disabled.
  • Things in the /TEST directory are not meant to be merged but include request URLs and a function to return responses from those requests. This should be removed before being merged in the final version of the PR. These responses were recorded during this block: 20923142
  • e2e/mockServer.js is the mock server and e2e/mockServer.d.ts is its type declarations. This server should recieve responses on localHost:3000 and return the correct responses that are located in the e2e/responses/ file
  • e2e/responses/ includes all swap responses that take place during our tests that were returned from the /TEST/script.py function. These are the actual mocks.
  • The e2e/setup.ts file was created to start and stop the server before and after all serial tests respectively.
  • The serial/vitest.config.ts file tells this file to run before the serial tests

e2e/mockServer.js Dismissed Show resolved Hide resolved
e2e/mockServer.js Fixed Show resolved Hide resolved
@BrodyHughes BrodyHughes requested a review from brunobar79 October 9, 2024 19:03
Copy link

socket-security bot commented Oct 11, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@sindresorhus/[email protected] None 0 10.5 kB sindresorhus
npm/@vitest/[email protected] None 0 150 kB antfu, oreanno, patak, ...1 more
npm/@vitest/[email protected] None 0 121 kB vitestbot
npm/@vitest/[email protected] environment 0 45.5 kB vitestbot
npm/@vitest/[email protected] None 0 88.9 kB antfu, oreanno, patak, ...1 more
npm/@vitest/[email protected] None 0 85.2 kB antfu, oreanno, patak, ...1 more
npm/@vitest/[email protected] None 0 19.1 kB antfu, oreanno, patak, ...1 more
npm/@vitest/[email protected] None 0 155 kB antfu, oreanno, patak, ...1 more
npm/[email protected] network +2 409 kB ulisesgascon
npm/[email protected] None 0 23.3 kB blakeembrey
npm/[email protected] None 0 6.98 kB blakeembrey
npm/[email protected] None 0 17.6 kB rich_harris
npm/[email protected] environment, filesystem, network +2 278 kB ulisesgascon
npm/[email protected] environment +1 23.3 kB wesleytodd
npm/[email protected] None 0 60.7 kB chaijs
npm/[email protected] None +1 577 kB antfu
npm/[email protected] None 0 5.08 kB sindresorhus
npm/[email protected] None 0 6.38 kB blakeembrey
npm/[email protected] None +2 376 kB ljharb
npm/[email protected] network, unsafe 0 25.8 kB dougwilson
npm/[email protected] filesystem, network +1 58.1 kB ulisesgascon
npm/[email protected] None 0 25.4 kB wesleytodd
npm/[email protected] environment, shell 0 45.6 kB 43081j
npm/[email protected] filesystem, shell, unsafe 0 49.9 kB ariperkkio
npm/[email protected] None 0 7.91 kB oreanno
npm/[email protected] None 0 17.6 kB antfu, aslemammad, oreanno
npm/[email protected] None 0 3.45 kB sindresorhus
npm/[email protected] None 0 204 kB antfu, oreanno, patak, ...1 more
npm/[email protected] environment, eval +1 1.73 MB vitestbot
npm/[email protected] filesystem, unsafe 0 7.3 kB mafintosh

🚮 Removed packages: npm/@types/[email protected], npm/@vitest/[email protected], npm/@vitest/[email protected], npm/@vitest/[email protected], npm/@vitest/[email protected], npm/@vitest/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

@BrodyHughes BrodyHughes self-assigned this Oct 25, 2024
@BrodyHughes
Copy link
Member Author

closed in favor of: #1754

@BrodyHughes BrodyHughes deleted the brody/mocking-setup branch November 27, 2024 22:40
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