@@ -2,18 +2,18 @@ import type { BlobSinkArchiveApiConfig } from './config.js';
22import { createBlobArchiveClient } from './factory.js' ;
33
44describe ( 'BlobscanArchiveClient factory' , ( ) => {
5- it . each < [ string , BlobSinkArchiveApiConfig , boolean , string ] > ( [
6- [ 'empty config' , { } , false , '' ] ,
7- [ 'random chain, no custom URL' , { l1ChainId : 23478 } , false , '' ] ,
5+ it . each < [ string , BlobSinkArchiveApiConfig , boolean , string | undefined ] > ( [
6+ [ 'empty config' , { } , false , undefined ] ,
7+ [ 'random chain, no custom URL' , { l1ChainId : 23478 } , false , undefined ] ,
88 [
99 'random chain, custom URL' ,
1010 { l1ChainId : 23478 , archiveApiUrl : 'https://example.com' } ,
1111 true ,
1212 'https://example.com/' ,
1313 ] ,
14- [ 'ETH mainnet default URL' , { l1ChainId : 1 } , true , 'https://api.blobscan.com/' ] ,
14+ [ 'ETH mainnet no default URL' , { l1ChainId : 1 } , false , undefined ] ,
1515 [ 'ETH mainnet custom URL' , { l1ChainId : 1 , archiveApiUrl : 'https://example.com' } , true , 'https://example.com/' ] ,
16- [ 'Sepolia default URL' , { l1ChainId : 11155111 } , true , 'https://api.sepolia.blobscan.com/' ] ,
16+ [ 'Sepolia no default URL' , { l1ChainId : 11155111 } , false , undefined ] ,
1717 [ 'Seplia custom URL' , { l1ChainId : 11155111 , archiveApiUrl : 'https://example.com' } , true , 'https://example.com/' ] ,
1818 ] ) ( 'can instantiate a client: %s' , ( _ , cfg , clientExpected , expectedBaseUrl ) => {
1919 const client = createBlobArchiveClient ( cfg ) ;
0 commit comments