Skip to content

Commit

Permalink
test(ui): intercept algod requests with Mock Service Worker (#103)
Browse files Browse the repository at this point in the history
* test(ui): intercept algod requests with Mock Service Worker

Since the app clients making simulate calls expect a functioning algod client as an argument, mocking algosdk.Algodv2 isn't an option.

MSW will let us intercept the actual http simulate requests to fetch data and mock their responses.

Now we can properly isolate components for testing and provide fixture data for predictable, repeatable outcomes.

* chore(ui): fix Prettier issue in tsconfig

* ci(ui): fix explorer account env variable
  • Loading branch information
drichar authored Apr 26, 2024
1 parent 7d9f052 commit 0f47bb8
Show file tree
Hide file tree
Showing 16 changed files with 1,623 additions and 26 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
VITE_ALGOD_PORT: 4001
VITE_NFD_API_URL: http://localhost:80
VITE_NFD_APP_URL: ws://localhost:3000
VITE_EXPLORER_ACCOUNT_URL: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/account

steps:
- name: Checkout repository
Expand Down
Loading

0 comments on commit 0f47bb8

Please sign in to comment.