Skip to content

Commit

Permalink
indexer-cli: add type annotation for test util network specification
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerner committed Jul 8, 2024
1 parent 4ff3265 commit ef488db
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/indexer-cli/src/__tests__/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
MultiNetworks,
Network,
QueryFeeModels,
specification,
SubgraphIdentifierType,
} from '@graphprotocol/indexer-common'
import {
Expand All @@ -36,6 +35,7 @@ import {
SubgraphDeploymentID,
} from '@graphprotocol/common-ts'
import cloneDeep from 'lodash.clonedeep'
import { NetworkSpecification } from '@graphprotocol/indexer-common/dist/network-specification'

const INDEXER_SAVE_CLI_TEST_OUTPUT: boolean =
!!process.env.INDEXER_SAVE_CLI_TEST_OUTPUT &&
Expand All @@ -55,7 +55,7 @@ let sockets: Socket[] = []
let metrics: Metrics

const yamlObj = loadTestYamlConfig()
const testNetworkSpecification = specification.NetworkSpecification.parse(yamlObj)
const testNetworkSpecification: NetworkSpecification = NetworkSpecification.parse(yamlObj)

export const setupMultiNetworks = async () => {
return await setup(true)
Expand Down Expand Up @@ -105,9 +105,9 @@ export const setup = async (multiNetworksEnabled: boolean) => {

const multiNetworks = multiNetworksEnabled
? new MultiNetworks(
[network, fakeMainnetNetwork],
(n: Network) => n.specification.networkIdentifier,
)
[network, fakeMainnetNetwork],
(n: Network) => n.specification.networkIdentifier,
)
: new MultiNetworks([network], (n: Network) => n.specification.networkIdentifier)

const defaults: IndexerManagementDefaults = {
Expand Down Expand Up @@ -374,7 +374,7 @@ export const cliTest = (
if (expectedStdout == undefined && expectedStderr == undefined) {
throw new Error(
`No matching expected stdout or expected stderr found for the '${title}' test. ` +
`Make sure there is least one expected output located at the defined 'outputReferencePath', '${outputReferencePath}'`,
`Make sure there is least one expected output located at the defined 'outputReferencePath', '${outputReferencePath}'`,
)
}

Expand Down

0 comments on commit ef488db

Please sign in to comment.