@@ -231,19 +231,20 @@ describe('BuilderManager Tests', () => {
231231 describe ( 'Advanced Configuration Testing' , ( ) => {
232232 it ( 'should handle build-enabled chain configuration' , ( ) => {
233233 const manager = new BuilderManager ( buildChainConfig ) ;
234-
234+
235235 const testSubDir = join ( testOutputDir , 'build-chain' ) ;
236236 manager . build ( testSubDir ) ;
237-
237+
238238 const yamlFiles = loadYamlFiles ( testSubDir ) ;
239239 expect ( yamlFiles ) . toMatchSnapshot ( 'build-chain-yaml-files' ) ;
240-
240+
241241 // Verify StatefulSets have build-related init containers
242242 Object . values ( yamlFiles ) . forEach ( ( content : any ) => {
243243 if ( content . kind === 'StatefulSet' ) {
244- const initContainers = content . spec ?. template ?. spec ?. initContainers || [ ] ;
245- const hasBuildContainer = initContainers . some ( ( container : any ) =>
246- container . name === 'init-build-images'
244+ const initContainers =
245+ content . spec ?. template ?. spec ?. initContainers || [ ] ;
246+ const hasBuildContainer = initContainers . some (
247+ ( container : any ) => container . name === 'init-build-images'
247248 ) ;
248249 expect ( hasBuildContainer ) . toBe ( true ) ;
249250 }
@@ -252,19 +253,22 @@ describe('BuilderManager Tests', () => {
252253
253254 it ( 'should handle CosmJS faucet configuration' , ( ) => {
254255 const manager = new BuilderManager ( cosmjsFaucetConfig ) ;
255-
256+
256257 const testSubDir = join ( testOutputDir , 'cosmjs-faucet' ) ;
257258 manager . build ( testSubDir ) ;
258-
259+
259260 const yamlFiles = loadYamlFiles ( testSubDir ) ;
260261 expect ( yamlFiles ) . toMatchSnapshot ( 'cosmjs-faucet-yaml-files' ) ;
261-
262+
262263 // Verify StatefulSets have faucet containers
263264 Object . values ( yamlFiles ) . forEach ( ( content : any ) => {
264- if ( content . kind === 'StatefulSet' && content . metadata . name . includes ( 'genesis' ) ) {
265+ if (
266+ content . kind === 'StatefulSet' &&
267+ content . metadata . name . includes ( 'genesis' )
268+ ) {
265269 const containers = content . spec ?. template ?. spec ?. containers || [ ] ;
266- const hasFaucetContainer = containers . some ( ( container : any ) =>
267- container . name === 'faucet'
270+ const hasFaucetContainer = containers . some (
271+ ( container : any ) => container . name === 'faucet'
268272 ) ;
269273 expect ( hasFaucetContainer ) . toBe ( true ) ;
270274 }
@@ -273,26 +277,26 @@ describe('BuilderManager Tests', () => {
273277
274278 it ( 'should handle Cometmock configuration' , ( ) => {
275279 const manager = new BuilderManager ( cometmockConfig ) ;
276-
280+
277281 const testSubDir = join ( testOutputDir , 'cometmock' ) ;
278282 manager . build ( testSubDir ) ;
279-
283+
280284 const yamlFiles = loadYamlFiles ( testSubDir ) ;
281285 expect ( yamlFiles ) . toMatchSnapshot ( 'cometmock-yaml-files' ) ;
282-
286+
283287 // Verify cosmoshub chain is generated (cometmock config uses cosmoshub)
284- const hasCosmoshubResources = Object . keys ( yamlFiles ) . some ( filePath =>
288+ const hasCosmoshubResources = Object . keys ( yamlFiles ) . some ( ( filePath ) =>
285289 filePath . includes ( 'cosmoshub/' )
286290 ) ;
287291 expect ( hasCosmoshubResources ) . toBe ( true ) ;
288292 } ) ;
289293
290294 it ( 'should skip Ethereum chains appropriately' , ( ) => {
291295 const manager = new BuilderManager ( ethereumConfig ) ;
292-
296+
293297 const testSubDir = join ( testOutputDir , 'ethereum-skip' ) ;
294298 manager . build ( testSubDir ) ;
295-
299+
296300 const yamlFiles = loadYamlFiles ( testSubDir ) ;
297301 expect ( yamlFiles ) . toMatchSnapshot ( 'ethereum-skip-yaml-files' ) ;
298302
@@ -306,45 +310,55 @@ describe('BuilderManager Tests', () => {
306310 } ) ;
307311
308312 describe ( 'Complex Configuration Scenarios' , ( ) => {
309-
310313 it ( 'should handle configuration with all builders enabled' , ( ) => {
311314 const fullConfig = {
312- name : 'full-testnet' ,
313- chains : [ singleChainConfig . chains [ 0 ] ] ,
314- registry : {
315- enabled : true ,
316- image : 'registry:latest' ,
317- ports : { rest : 8080 }
318- } ,
319- explorer : {
320- enabled : true ,
321- type : 'ping-pub' as const ,
322- image : 'explorer:latest' ,
323- ports : { rest : 8081 }
324- }
325- } ;
315+ name : 'full-testnet' ,
316+ chains : [ singleChainConfig . chains [ 0 ] ] ,
317+ registry : {
318+ enabled : true ,
319+ image : 'registry:latest' ,
320+ ports : { rest : 8080 }
321+ } ,
322+ explorer : {
323+ enabled : true ,
324+ type : 'ping-pub' as const ,
325+ image : 'explorer:latest' ,
326+ ports : { rest : 8081 }
327+ }
328+ } ;
326329
327330 const manager = new BuilderManager ( fullConfig ) ;
328-
331+
329332 const testSubDir = join ( testOutputDir , 'full-builders' ) ;
330333 manager . build ( testSubDir ) ;
331-
334+
332335 const yamlFiles = loadYamlFiles ( testSubDir ) ;
333336 expect ( yamlFiles ) . toMatchSnapshot ( 'full-builders-yaml-files' ) ;
334-
337+
335338 // Verify all expected directories exist
336339 const directories = readdirSync ( testSubDir , { withFileTypes : true } )
337340 . filter ( ( item ) => item . isDirectory ( ) )
338341 . map ( ( item ) => item . name )
339342 . sort ( ) ;
340-
341- expect ( directories ) . toEqual ( [ 'configmaps' , 'explorer' , 'osmosis' , 'registry' ] ) ;
342-
343+
344+ expect ( directories ) . toEqual ( [
345+ 'configmaps' ,
346+ 'explorer' ,
347+ 'osmosis' ,
348+ 'registry'
349+ ] ) ;
350+
343351 // Verify each component has correct files
344- const registryFiles = Object . keys ( yamlFiles ) . filter ( f => f . startsWith ( 'registry/' ) ) ;
345- const explorerFiles = Object . keys ( yamlFiles ) . filter ( f => f . startsWith ( 'explorer/' ) ) ;
346- const osmosisFiles = Object . keys ( yamlFiles ) . filter ( f => f . startsWith ( 'osmosis/' ) ) ;
347-
352+ const registryFiles = Object . keys ( yamlFiles ) . filter ( ( f ) =>
353+ f . startsWith ( 'registry/' )
354+ ) ;
355+ const explorerFiles = Object . keys ( yamlFiles ) . filter ( ( f ) =>
356+ f . startsWith ( 'explorer/' )
357+ ) ;
358+ const osmosisFiles = Object . keys ( yamlFiles ) . filter ( ( f ) =>
359+ f . startsWith ( 'osmosis/' )
360+ ) ;
361+
348362 expect ( registryFiles . length ) . toBeGreaterThan ( 0 ) ;
349363 expect ( explorerFiles . length ) . toBeGreaterThan ( 0 ) ;
350364 expect ( osmosisFiles . length ) . toBeGreaterThan ( 0 ) ;
@@ -356,27 +370,27 @@ describe('BuilderManager Tests', () => {
356370 const specialConfig = {
357371 name : 'special-testnet' ,
358372 chains : [
359- {
360- ...singleChainConfig . chains [ 0 ] ,
361- name : 'test-chain' as any ,
362- id : 'test-chain-1'
363- }
373+ {
374+ ...singleChainConfig . chains [ 0 ] ,
375+ name : 'test-chain' as any ,
376+ id : 'test-chain-1'
377+ }
364378 ]
365379 } ;
366380
367381 const manager = new BuilderManager ( specialConfig ) ;
368-
382+
369383 const testSubDir = join ( testOutputDir , 'special-chars' ) ;
370384 manager . build ( testSubDir ) ;
371-
385+
372386 const yamlFiles = loadYamlFiles ( testSubDir ) ;
373387 expect ( yamlFiles ) . toMatchSnapshot ( 'special-chars-yaml-files' ) ;
374-
388+
375389 // Verify directory uses chain name correctly
376390 const directories = readdirSync ( testSubDir , { withFileTypes : true } )
377391 . filter ( ( item ) => item . isDirectory ( ) )
378392 . map ( ( item ) => item . name ) ;
379-
393+
380394 expect ( directories ) . toContain ( 'test-chain' ) ;
381395 } ) ;
382396
@@ -398,13 +412,13 @@ describe('BuilderManager Tests', () => {
398412
399413 const files = getAllYamlFiles ( testSubDir ) ;
400414 const fileStructure : Record < string , string [ ] > = { } ;
401-
415+
402416 files . forEach ( ( filePath ) => {
403417 const relativePath = filePath . replace ( testSubDir + '/' , '' ) ;
404418 const parts = relativePath . split ( '/' ) ;
405419 const directory = parts [ 0 ] ;
406420 const fileName = parts [ parts . length - 1 ] ;
407-
421+
408422 if ( ! fileStructure [ directory ] ) {
409423 fileStructure [ directory ] = [ ] ;
410424 }
0 commit comments