-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added tests for getChainExplorer (#859)
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@coinbase/onchainkit": patch | ||
--- | ||
|
||
-**chore**: Add unit tests for getChainExplorer. By @cpcramer #859 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { baseSepolia } from 'viem/chains'; | ||
import { describe, expect, it } from 'vitest'; | ||
import { getChainExplorer } from './getChainExplorer'; | ||
|
||
describe('getChainExplorer', () => { | ||
it('should return the correct chain explorer for baseSepolia', () => { | ||
expect(getChainExplorer(baseSepolia.id)).toBe( | ||
'https://sepolia.basescan.org', | ||
); | ||
}); | ||
|
||
it('should return the default chain explorer for other chains', () => { | ||
expect(getChainExplorer(123)).toBe('https://basescan.org'); | ||
}); | ||
}); |