Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
yoozo committed Nov 21, 2024
1 parent cd2375b commit 023c10a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/node-core/src/indexer/fetch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export abstract class BaseFetchService<DS extends BaseDataSource, B extends IBlo
}

// Update the target height, this happens here to stay in sync with the rest of indexing
await this.storeModelProvider.metadata.set('targetHeight', latestHeight);
this.storeModelProvider.metadata.set('targetHeight', latestHeight);

// This could be latestBestHeight, dictionary should never include finalized blocks
// TODO add buffer so dictionary not used when project synced
Expand Down
6 changes: 3 additions & 3 deletions packages/node-core/src/indexer/test.runner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('TestRunner', () => {
storeServiceMock = {
setBlockHeight: jest.fn(),
getStore: jest.fn().mockReturnValue({}),
storeCache: mockStoreCache,
modelProvider: mockStoreCache,
};

sandboxMock = {
Expand Down Expand Up @@ -123,7 +123,7 @@ describe('TestRunner', () => {
(testRunner as any).storeService = {
getStore: () => storeMock,
setBlockHeight: jest.fn(),
storeCache: mockStoreCache,
modelProvider: mockStoreCache,
} as any;

await testRunner.runTest(testMock, sandboxMock, indexBlock);
Expand Down Expand Up @@ -180,7 +180,7 @@ describe('TestRunner', () => {
(testRunner as any).storeService = {
getStore: () => storeMock,
setBlockHeight: jest.fn(),
storeCache: mockStoreCache,
modelProvider: mockStoreCache,
} as any;

await testRunner.runTest(testMock, sandboxMock, indexBlock);
Expand Down

0 comments on commit 023c10a

Please sign in to comment.