From 279f821b94e9702a1843b8b7a36075442ba6681f Mon Sep 17 00:00:00 2001 From: fewensa Date: Wed, 28 Aug 2024 09:01:25 +0000 Subject: [PATCH] Test indexers if defined --- template/ts/files/tests/generatedconfig.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/template/ts/files/tests/generatedconfig.test.ts b/template/ts/files/tests/generatedconfig.test.ts index 69a3524..0a4eab7 100644 --- a/template/ts/files/tests/generatedconfig.test.ts +++ b/template/ts/files/tests/generatedconfig.test.ts @@ -76,9 +76,11 @@ describe.each(TestSource.chains())('helix chain config check -> $_data.code', (c })).toBeTruthy(); }); - test.each(chain.indexers)('should be defined correct indexer', (indexer) => { - expect(Object.values(['thegraph', 'ponder', 'hyperindex'])).toContain(indexer.type); - }); + if (chain.indexers.length) { + test.each(chain.indexers)('should be defined correct indexer', (indexer) => { + expect(Object.values(['thegraph', 'ponder', 'hyperindex'])).toContain(indexer.type); + }); + } test.each(chain.messagers)('should be defined messagers address', (messager) => { expect(messager.address).toBeTruthy();