-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The import of the `chains` variable from `fetch/openapi.ts` caused a DB query to be executed once the module was loaded. This behavior was also preventing testing any function inside the `queries.ts` module. The fix makes the `getBlock` function explicitly query the DB for supported chains (as they might also get updated over time). The function is mocked in the tests using the latest Bun feature (1.0.8+) of *mock modules* in order to allow "offline" testing.
- Loading branch information
Showing
4 changed files
with
59 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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