Repository: graphprotocol/graph-tooling
Pull request #1886 (2024-12-27 20:24:17)

Tests cleanup
- tests cleanup
- allow tests CI from forks

changeset-bot[bot]: ###  ⚠️  No Changeset found

Latest commit: 131cbea8b3389fafa35b73b9c8d3b3f3f7731baa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/graphprotocol/graph-tooling/new/yaro/tests-cleanup?filename=.changeset/fast-insects-raise.md&value=---%0A%22%40graphprotocol%2Fgraph-cli%22%3A%20patch%0A---%0A%0ATests%20cleanup%0A)



Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c08326b5..3775db14 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -5,7 +5,7 @@ on:
   push:
     branches:
       - 'main'
-  pull_request:
+  pull_request_target:
 
 jobs:
   lint:


Test patch:
diff --git a/packages/cli/src/codegen/schema.test.ts b/packages/cli/src/codegen/schema.test.ts
index 24bb7de8..6f549d01 100644
--- a/packages/cli/src/codegen/schema.test.ts
+++ b/packages/cli/src/codegen/schema.test.ts
@@ -38,7 +38,7 @@ const testEntity = async (generatedTypes: any[], expectedEntity: any) => {
   expect(methods.length).toBe(expectedEntity.methods.length);
 };
 
-describe.concurrent('Schema code generator', () => {
+describe('Schema code generator', { concurrent: true }, () => {
   test('Should generate nothing for non entity types', () => {
     const codegen = createSchemaCodeGen(`
       type Foo {
@@ -217,7 +217,7 @@ describe.concurrent('Schema code generator', () => {
               return 0
             } else {
               return value.toI32()
-            } 
+            }
             `,
           },
           {
@@ -313,7 +313,7 @@ describe.concurrent('Schema code generator', () => {
             params: [],
             returnType: new NamedType('WalletLoader'),
             body: `
-              return new WalletLoader("Account", this.get('id')!.toString(), "wallets") 
+              return new WalletLoader("Account", this.get('id')!.toString(), "wallets")
             `,
           },
         ],
@@ -566,7 +566,7 @@ describe.concurrent('Schema code generator', () => {
         id: Bytes!
         related: [RelatedBytes!]! @derivedFrom(field: "related")
       }
-      
+
       type RelatedBytes @entity {
         id: ID!
         related: WithBytes!
@@ -647,17 +647,17 @@ describe.concurrent('Schema code generator', () => {
   test('no derived loader for interface', () => {
     const codegen = createSchemaCodeGen(`
     interface IExample {
-      id: ID! 
+      id: ID!
       main: Main!
       num: Int!
     }
-    
+
     type Example1 implements IExample @entity {
-      id: ID! 
+      id: ID!
       main: Main!
       num: Int!
     }
-    
+
     type Main @entity {
       id: ID!
       examples: [IExample!]! @derivedFrom(field: "main")
diff --git a/packages/cli/src/codegen/types/index.test.ts b/packages/cli/src/codegen/types/index.test.ts
index c0871380..99c60c43 100644
--- a/packages/cli/src/codegen/types/index.test.ts
+++ b/packages/cli/src/codegen/types/index.test.ts
@@ -1,7 +1,7 @@
 import { describe, expect, test } from 'vitest';
 import * as codegen from './index.js';
 
-describe.concurrent('ethereum.Value -> AssemblyScript', () => {
+describe('ethereum.Value -> AssemblyScript', { concurrent: true }, () => {
   // Scalar values
 
   test('address -> Address', () => {
diff --git a/packages/cli/src/codegen/util.test.ts b/packages/cli/src/codegen/util.test.ts
index 34d475ce..40389354 100644
--- a/packages/cli/src/codegen/util.test.ts
+++ b/packages/cli/src/codegen/util.test.ts
@@ -1,7 +1,7 @@
 import { describe, expect, test } from 'vitest';
 import { disambiguateNames, unrollTuple } from './util.js';
 
-describe.concurrent('Codegen utilities', () => {
+describe('Codegen utilities', { concurrent: true }, () => {
   test('Name disambiguation', () => {
     expect(
       disambiguateNames({
diff --git a/packages/cli/src/command-helpers/compiler.test.ts b/packages/cli/src/command-helpers/compiler.test.ts
index 7965b412..533ed054 100644
--- a/packages/cli/src/command-helpers/compiler.test.ts
+++ b/packages/cli/src/command-helpers/compiler.test.ts
@@ -1,7 +1,7 @@
 import { describe, expect, it } from 'vitest';
 import { appendApiVersionForGraph } from './compiler.js';
 
-describe.concurrent('appendApiVersionForGraph', () => {
+describe('appendApiVersionForGraph', { concurrent: true }, () => {
   it('append /api/v0 to Prod URL with trailing slash', () => {
     expect(appendApiVersionForGraph('https://api.thegraph.com/ipfs/')).toBe(
       'https://api.thegraph.com/ipfs/api/v0',
diff --git a/packages/cli/src/command-helpers/contracts.test.ts b/packages/cli/src/command-helpers/contracts.test.ts
index c650a181..0036a226 100644
--- a/packages/cli/src/command-helpers/contracts.test.ts
+++ b/packages/cli/src/command-helpers/contracts.test.ts
@@ -85,7 +85,7 @@ const TEST_CONTRACT_START_BLOCKS = {
   // },
 };
 
-describe.sequential('getStartBlockForContract', async () => {
+describe('getStartBlockForContract', { sequential: true }, async () => {
   const registry = await loadRegistry();
   const contractService = new ContractService(registry);
   for (const [network, contracts] of Object.entries(TEST_CONTRACT_START_BLOCKS)) {
diff --git a/packages/cli/src/command-helpers/version.test.ts b/packages/cli/src/command-helpers/version.test.ts
index 02c540b3..26aacc8d 100644
--- a/packages/cli/src/command-helpers/version.test.ts
+++ b/packages/cli/src/command-helpers/version.test.ts
@@ -3,7 +3,7 @@ import * as loadManifestUtils from '../migrations/util/load-manifest.js';
 import * as graphTsUtil from '../migrations/util/versions.js';
 import { assertGraphTsVersion, assertManifestApiVersion } from './version.js';
 
-describe.concurrent('Version Command Helpers', () => {
+describe('Version Command Helpers', { concurrent: true }, () => {
   beforeEach(() => {
     vi.resetModules();
   });
diff --git a/packages/cli/src/protocols/ethereum/codegen/__snapshots__/abi.test.ts.snap b/packages/cli/src/protocols/ethereum/codegen/__snapshots__/abi.test.ts.snap
index 7da206be..9fc49309 100644
--- a/packages/cli/src/protocols/ethereum/codegen/__snapshots__/abi.test.ts.snap
+++ b/packages/cli/src/protocols/ethereum/codegen/__snapshots__/abi.test.ts.snap
@@ -1,485 +1,5 @@
 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
 
-exports[`ABI code generation > Generated types > Type generated 1`] = `
-Class {
-  "export": true,
-  "extends": "ethereum.Tuple",
-  "members": [],
-  "methods": [
-    Method {
-      "body": "
-            return this[0].toI32()
-            ",
-      "name": "get result",
-      "params": [],
-      "returnType": "i32",
-    },
-    Method {
-      "body": "
-            return this[1].toAddress()
-            ",
-      "name": "get target",
-      "params": [],
-      "returnType": "Address",
-    },
-    Method {
-      "body": "
-            return this[2].toBytes()
-            ",
-      "name": "get data",
-      "params": [],
-      "returnType": "Bytes",
-    },
-    Method {
-      "body": "
-            return this[3].toAddress()
-            ",
-      "name": "get proposer",
-      "params": [],
-      "returnType": "Address",
-    },
-    Method {
-      "body": "
-            return this[4].toAddress()
-            ",
-      "name": "get feeRecipient",
-      "params": [],
-      "returnType": "Address",
-    },
-    Method {
-      "body": "
-            return this[5].toBigInt()
-            ",
-      "name": "get fee",
-      "params": [],
-      "returnType": "BigInt",
-    },
-    Method {
-      "body": "
-            return this[6].toBigInt()
-            ",
-      "name": "get startTime",
-      "params": [],
-      "returnType": "BigInt",
-    },
-    Method {
-      "body": "
-            return this[7].toBigInt()
-            ",
-      "name": "get yesCount",
-      "params": [],
-      "returnType": "BigInt",
-    },
-    Method {
-      "body": "
-            return this[8].toBigInt()
-            ",
-      "name": "get noCount",
-      "params": [],
-      "returnType": "BigInt",
-    },
-  ],
-  "name": "Contract__getProposalResultValue0Struct",
-}
-`;
-
-exports[`ABI code generation > Generated types > Type generated 2`] = `
-Class {
-  "export": true,
-  "extends": "ethereum.Tuple",
-  "members": [],
-  "methods": [
-    Method {
-      "body": "
-            return this[0].toI32()
-            ",
-      "name": "get foo",
-      "params": [],
-      "returnType": "i32",
-    },
-    Method {
-      "body": "
-      return changetype<Contract__getProposalInputParam1BarStruct>(this[1].toTuple())
-      ",
-      "name": "get bar",
-      "params": [],
-      "returnType": "Contract__getProposalInputParam1BarStruct",
-    },
-  ],
-  "name": "Contract__getProposalInputParam1Struct",
-}
-`;
-
-exports[`ABI code generation > Generated types > Type generated 3`] = `
-Class {
-  "export": true,
-  "extends": "ethereum.Tuple",
-  "members": [],
-  "methods": [
-    Method {
-      "body": "
-            return this[0].toAddress()
-            ",
-      "name": "get baz",
-      "params": [],
-      "returnType": "Address",
-    },
-  ],
-  "name": "Contract__getProposalInputParam1BarStruct",
-}
-`;
-
-exports[`ABI code generation > Generated types > Type generated 4`] = `
-Class {
-  "export": true,
-  "extends": "ethereum.Tuple",
-  "members": [],
-  "methods": [
-    Method {
-      "body": "
-            return this[0].toBigInt()
-            ",
-      "name": "get first",
-      "params": [],
-      "returnType": "BigInt",
-    },
-    Method {
-      "body": "
-            return this[1].toString()
-            ",
-      "name": "get second",
-      "params": [],
-      "returnType": "string",
-    },
-  ],
-  "name": "Contract__getProposalsResultValue1Struct",
-}
-`;
-
-exports[`ABI code generation > Generated types > Type generated 5`] = `
-Class {
-  "export": true,
-  "extends": undefined,
-  "members": [
-    ClassMember {
-      "name": "value0",
-      "type": "BigInt",
-    },
-    ClassMember {
-      "name": "value1",
-      "type": "Array<Contract__getProposalsResultValue1Struct>",
-    },
-  ],
-  "methods": [
-    Method {
-      "body": "this.value0 = value0
-this.value1 = value1",
-      "name": "constructor",
-      "params": Immutable.List [
-        Param {
-          "name": "value0",
-          "type": "BigInt",
-        },
-        Param {
-          "name": "value1",
-          "type": "Array<Contract__getProposalsResultValue1Struct>",
-        },
-      ],
-      "returnType": null,
-    },
-    Method {
-      "body": "
-            let map = new TypedMap<string,ethereum.Value>();
-            map.set('value0', ethereum.Value.fromUnsignedBigInt(this.value0));map.set('value1', ethereum.Value.fromTupleArray(this.value1))
-            return map;
-            ",
-      "name": "toMap",
-      "params": [],
-      "returnType": NamedType {
-        "name": "TypedMap<string,ethereum.Value>",
-      },
-    },
-    Method {
-      "body": "return this.value0;",
-      "name": "getSize",
-      "params": [],
-      "returnType": "BigInt",
-    },
-    Method {
-      "body": "return this.value1;",
-      "name": "getValue1",
-      "params": [],
-      "returnType": "Array<Contract__getProposalsResultValue1Struct>",
-    },
-  ],
-  "name": "Contract__getProposalsResult",
-}
-`;
-
-exports[`ABI code generation > Generated types > Type generated 6`] = `
-Class {
-  "export": true,
-  "extends": "ethereum.SmartContract",
-  "members": [],
-  "methods": [
-    StaticMethod {
-      "body": "
-        return new Contract('Contract', address);
-        ",
-      "name": "bind",
-      "params": Immutable.List [
-        Param {
-          "name": "address",
-          "type": "Address",
-        },
-      ],
-      "returnType": NamedType {
-        "name": "Contract",
-      },
-    },
-    Method {
-      "body": "
-        
-        let result = super.call(
-      'read',
-      'read():(bytes32)',
-      [])
-
-        return ( result[0].toBytes())",
-      "name": "read",
-      "params": Immutable.List [],
-      "returnType": NamedType {
-        "name": "Bytes",
-      },
-    },
-    Method {
-      "body": "
-        
-        let result = super.tryCall(
-      'read',
-      'read():(bytes32)',
-      [])
-        if (result.reverted) {
-          return new ethereum.CallResult()
-        }
-        let value = result.value
-        return ethereum.CallResult.fromValue( value[0].toBytes())",
-      "name": "try_read",
-      "params": Immutable.List [],
-      "returnType": "ethereum.CallResult<Bytes>",
-    },
-    Method {
-      "body": "
-        
-        let result = super.call(
-      'getProposal',
-      'getProposal(uint256,(uint8,(address))):((uint8,address,bytes,address,address,uint256,uint256,uint256,uint256))',
-      [ethereum.Value.fromUnsignedBigInt(proposalId), ethereum.Value.fromTuple(param1)])
-
-        return ( changetype<Contract__getProposalResultValue0Struct>(result[0].toTuple()))",
-      "name": "getProposal",
-      "params": Immutable.List [
-        Param {
-          "name": "proposalId",
-          "type": "BigInt",
-        },
-        Param {
-          "name": "param1",
-          "type": "Contract__getProposalInputParam1Struct",
-        },
-      ],
-      "returnType": NamedType {
-        "name": "Contract__getProposalResultValue0Struct",
-      },
-    },
-    Method {
-      "body": "
-        
-        let result = super.tryCall(
-      'getProposal',
-      'getProposal(uint256,(uint8,(address))):((uint8,address,bytes,address,address,uint256,uint256,uint256,uint256))',
-      [ethereum.Value.fromUnsignedBigInt(proposalId), ethereum.Value.fromTuple(param1)])
-        if (result.reverted) {
-          return new ethereum.CallResult()
-        }
-        let value = result.value
-        return ethereum.CallResult.fromValue( changetype<Contract__getProposalResultValue0Struct>(value[0].toTuple()))",
-      "name": "try_getProposal",
-      "params": Immutable.List [
-        Param {
-          "name": "proposalId",
-          "type": "BigInt",
-        },
-        Param {
-          "name": "param1",
-          "type": "Contract__getProposalInputParam1Struct",
-        },
-      ],
-      "returnType": "ethereum.CallResult<Contract__getProposalResultValue0Struct>",
-    },
-    Method {
-      "body": "
-        
-        let result = super.call(
-      'getProposals',
-      'getProposals():(uint256,(uint256,string)[])',
-      [])
-
-        return ( new Contract__getProposalsResult(
-                result[0].toBigInt(), result[1].toTupleArray<Contract__getProposalsResultValue1Struct>()
-              ))",
-      "name": "getProposals",
-      "params": Immutable.List [],
-      "returnType": NamedType {
-        "name": "Contract__getProposalsResult",
-      },
-    },
-    Method {
-      "body": "
-        
-        let result = super.tryCall(
-      'getProposals',
-      'getProposals():(uint256,(uint256,string)[])',
-      [])
-        if (result.reverted) {
-          return new ethereum.CallResult()
-        }
-        let value = result.value
-        return ethereum.CallResult.fromValue( new Contract__getProposalsResult(
-                value[0].toBigInt(), value[1].toTupleArray<Contract__getProposalsResultValue1Struct>()
-              ))",
-      "name": "try_getProposals",
-      "params": Immutable.List [],
-      "returnType": "ethereum.CallResult<Contract__getProposalsResult>",
-    },
-    Method {
-      "body": "
-        
-        let result = super.call(
-      'overloaded',
-      'overloaded(string):(string)',
-      [ethereum.Value.fromString(param0)])
-
-        return ( result[0].toString())",
-      "name": "overloaded",
-      "params": Immutable.List [
-        Param {
-          "name": "param0",
-          "type": "string",
-        },
-      ],
-      "returnType": NamedType {
-        "name": "string",
-      },
-    },
-    Method {
-      "body": "
-        
-        let result = super.tryCall(
-      'overloaded',
-      'overloaded(string):(string)',
-      [ethereum.Value.fromString(param0)])
-        if (result.reverted) {
-          return new ethereum.CallResult()
-        }
-        let value = result.value
-        return ethereum.CallResult.fromValue( value[0].toString())",
-      "name": "try_overloaded",
-      "params": Immutable.List [
-        Param {
-          "name": "param0",
-          "type": "string",
-        },
-      ],
-      "returnType": "ethereum.CallResult<string>",
-    },
-    Method {
-      "body": "
-        
-        let result = super.call(
-      'overloaded',
-      'overloaded(uint256):(string)',
-      [ethereum.Value.fromUnsignedBigInt(param0)])
-
-        return ( result[0].toString())",
-      "name": "overloaded1",
-      "params": Immutable.List [
-        Param {
-          "name": "param0",
-          "type": "BigInt",
-        },
-      ],
-      "returnType": NamedType {
-        "name": "string",
-      },
-    },
-    Method {
-      "body": "
-        
-        let result = super.tryCall(
-      'overloaded',
-      'overloaded(uint256):(string)',
-      [ethereum.Value.fromUnsignedBigInt(param0)])
-        if (result.reverted) {
-          return new ethereum.CallResult()
-        }
-        let value = result.value
-        return ethereum.CallResult.fromValue( value[0].toString())",
-      "name": "try_overloaded1",
-      "params": Immutable.List [
-        Param {
-          "name": "param0",
-          "type": "BigInt",
-        },
-      ],
-      "returnType": "ethereum.CallResult<string>",
-    },
-    Method {
-      "body": "
-        
-        let result = super.call(
-      'overloaded',
-      'overloaded(bytes32):(string)',
-      [ethereum.Value.fromFixedBytes(param0)])
-
-        return ( result[0].toString())",
-      "name": "overloaded2",
-      "params": Immutable.List [
-        Param {
-          "name": "param0",
-          "type": "Bytes",
-        },
-      ],
-      "returnType": NamedType {
-        "name": "string",
-      },
-    },
-    Method {
-      "body": "
-        
-        let result = super.tryCall(
-      'overloaded',
-      'overloaded(bytes32):(string)',
-      [ethereum.Value.fromFixedBytes(param0)])
-        if (result.reverted) {
-          return new ethereum.CallResult()
-        }
-        let value = result.value
-        return ethereum.CallResult.fromValue( value[0].toString())",
-      "name": "try_overloaded2",
-      "params": Immutable.List [
-        Param {
-          "name": "param0",
-          "type": "Bytes",
-        },
-      ],
-      "returnType": "ethereum.CallResult<string>",
-    },
-  ],
-  "name": "Contract",
-}
-`;
-
 exports[`ABI code generation > Generated types > Type test 1`] = `
 Class {
   "export": true,
diff --git a/packages/cli/src/protocols/ethereum/codegen/abi.test.ts b/packages/cli/src/protocols/ethereum/codegen/abi.test.ts
index a274559a..c7acce28 100644
--- a/packages/cli/src/protocols/ethereum/codegen/abi.test.ts
+++ b/packages/cli/src/protocols/ethereum/codegen/abi.test.ts
@@ -8,7 +8,7 @@ let tempdir: string;
 let abi: ABI;
 let generatedTypes: any[] = [];
 
-describe.concurrent('ABI code generation', () => {
+describe('ABI code generation', { concurrent: true }, () => {
   beforeAll(async () => {
     tempdir = await fs.mkdtemp('abi-codegen');
 
diff --git a/packages/cli/src/validation/schema.test.ts b/packages/cli/src/validation/schema.test.ts
index 8719dbe6..f2f40022 100644
--- a/packages/cli/src/validation/schema.test.ts
+++ b/packages/cli/src/validation/schema.test.ts
@@ -1,7 +1,7 @@
 import { describe, expect, test } from 'vitest';
 import { typeSuggestion } from './schema.js';
 
-describe.concurrent('Schema validation', () => {
+describe('Schema validation', { concurrent: true }, () => {
   test('Type suggestions', () => {
     expect(typeSuggestion('Address')).toEqual('Bytes');
     expect(typeSuggestion('address')).toEqual('Bytes');
diff --git a/packages/cli/tests/cli/init.test.ts b/packages/cli/tests/cli/init.test.ts
index 874659a2..392c0af6 100644
--- a/packages/cli/tests/cli/init.test.ts
+++ b/packages/cli/tests/cli/init.test.ts
@@ -4,8 +4,12 @@ import { cliTest } from './util';
 
 // we run the tests sequentially because each init command installs deps with the
 // same package manager and we want to avoid race conditions on the deps cache
-describe.sequential(
+describe(
   'Init',
+  {
+    sequential: true,
+    timeout: 100_000,
+  },
   () => {
     const baseDir = path.join(__dirname, 'init');
 
@@ -238,7 +242,4 @@ describe.sequential(
       );
     });
   },
-  {
-    timeout: 60_000,
-  },
 );
diff --git a/packages/cli/tests/cli/validation.test.ts b/packages/cli/tests/cli/validation.test.ts
index b0432ee6..81a7838f 100644
--- a/packages/cli/tests/cli/validation.test.ts
+++ b/packages/cli/tests/cli/validation.test.ts
@@ -1,266 +1,250 @@
 import { describe } from 'vitest';
 import { cliTest } from './util';
 
-describe.concurrent(
-  'Validation',
-  () => {
-    cliTest(
-      'Block handler filters',
-      ['codegen', '--skip-migrations'],
-      'validation/block-handler-filters',
-      {
-        exitCode: 0,
-      },
-    );
-    cliTest(
-      'Invalid subgraph manifest',
-      ['codegen', '--skip-migrations'],
-      'validation/invalid-manifest',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'Invalid subgraph manifest (cannot infer protocol)',
-      ['codegen', '--skip-migrations'],
-      'validation/invalid-manifest-cannot-infer-protocol',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'ABI not found in data source',
-      ['codegen', '--skip-migrations'],
-      'validation/abi-not-found',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest('Invalid ABI files', ['codegen', '--skip-migrations'], 'validation/invalid-abis', {
+describe('Validation', { concurrent: true, timeout: 60_000 }, () => {
+  cliTest(
+    'Block handler filters',
+    ['codegen', '--skip-migrations'],
+    'validation/block-handler-filters',
+    {
+      exitCode: 0,
+    },
+  );
+  cliTest(
+    'Invalid subgraph manifest',
+    ['codegen', '--skip-migrations'],
+    'validation/invalid-manifest',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'Invalid subgraph manifest (cannot infer protocol)',
+    ['codegen', '--skip-migrations'],
+    'validation/invalid-manifest-cannot-infer-protocol',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'ABI not found in data source',
+    ['codegen', '--skip-migrations'],
+    'validation/abi-not-found',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest('Invalid ABI files', ['codegen', '--skip-migrations'], 'validation/invalid-abis', {
+    exitCode: 1,
+  });
+  cliTest(
+    'Event not found in ABI',
+    ['codegen', '--skip-migrations'],
+    'validation/event-not-found',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'Call function not found in the ABI',
+    ['codegen', '--skip-migrations'],
+    'validation/call-function-not-found',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'Call handler with tuple',
+    ['codegen', '--skip-migrations'],
+    'validation/call-handler-with-tuple',
+    {
+      exitCode: 0,
+    },
+  );
+  cliTest('2D arrays are valid', ['codegen', '--skip-migrations'], 'validation/2d-array-is-valid', {
+    exitCode: 0,
+  });
+  cliTest('3D arrays are valid', ['codegen', '--skip-migrations'], 'validation/3d-array-is-valid', {
+    exitCode: 0,
+  });
+  cliTest(
+    'Missing entity "id" field',
+    ['codegen', '--skip-migrations'],
+    'validation/missing-entity-id',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'Invalid entity field types',
+    ['codegen', '--skip-migrations'],
+    'validation/invalid-entity-field-types',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'Invalid contract addresses',
+    ['codegen', '--skip-migrations'],
+    'validation/invalid-contract-addresses',
+  );
+  cliTest(
+    'Entity field arguments',
+    ['codegen', '--skip-migrations'],
+    'validation/entity-field-args',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'Example values found in manifest',
+    ['codegen', '--skip-migrations'],
+    'validation/example-values-found',
+    { exitCode: 0 },
+  );
+  cliTest(
+    'Source without address is valid',
+    ['codegen', '--skip-migrations'],
+    'validation/source-without-address-is-valid',
+    {
+      exitCode: 0,
+    },
+  );
+  cliTest(
+    'Invalid data source template',
+    ['codegen', '--skip-migrations'],
+    'validation/invalid-data-source-template',
+    { exitCode: 1 },
+  );
+  cliTest(
+    'BigDecimal is a valid type',
+    ['codegen', '--skip-migrations'],
+    'validation/big-decimal-is-valid',
+    {
+      exitCode: 0,
+    },
+  );
+  cliTest(
+    'topic0 is valid in an event handler',
+    ['codegen', '--skip-migrations'],
+    'validation/topic0-is-valid',
+    {
+      exitCode: 0,
+    },
+  );
+  cliTest(
+    'Ethereum contract data source without handlers',
+    ['codegen', '--skip-migrations'],
+    'validation/ethereum-contract-without-handlers',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'Missing or invalid @derivedFrom fields',
+    ['codegen', '--skip-migrations'],
+    'validation/missing-or-invalid-derived-from-fields',
+    {
+      exitCode: 1,
+    },
+  );
+  cliTest(
+    'Deriving from interface-typed fields is allowed',
+    ['codegen', '--skip-migrations'],
+    'validation/derived-from-with-interface',
+    {
+      exitCode: 0,
+    },
+  );
+  cliTest(
+    '@derivedFrom target type missing',
+    ['codegen', '--skip-migrations'],
+    'validation/derived-from-target-type-missing',
+    {
       exitCode: 1,
-    });
-    cliTest(
-      'Event not found in ABI',
-      ['codegen', '--skip-migrations'],
-      'validation/event-not-found',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'Call function not found in the ABI',
-      ['codegen', '--skip-migrations'],
-      'validation/call-function-not-found',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'Call handler with tuple',
-      ['codegen', '--skip-migrations'],
-      'validation/call-handler-with-tuple',
-      {
-        exitCode: 0,
-      },
-    );
-    cliTest(
-      '2D arrays are valid',
-      ['codegen', '--skip-migrations'],
-      'validation/2d-array-is-valid',
-      {
-        exitCode: 0,
-      },
-    );
-    cliTest(
-      '3D arrays are valid',
-      ['codegen', '--skip-migrations'],
-      'validation/3d-array-is-valid',
-      {
-        exitCode: 0,
-      },
-    );
-    cliTest(
-      'Missing entity "id" field',
-      ['codegen', '--skip-migrations'],
-      'validation/missing-entity-id',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'Invalid entity field types',
-      ['codegen', '--skip-migrations'],
-      'validation/invalid-entity-field-types',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'Invalid contract addresses',
-      ['codegen', '--skip-migrations'],
-      'validation/invalid-contract-addresses',
-    );
-    cliTest(
-      'Entity field arguments',
-      ['codegen', '--skip-migrations'],
-      'validation/entity-field-args',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'Example values found in manifest',
-      ['codegen', '--skip-migrations'],
-      'validation/example-values-found',
-      { exitCode: 0 },
-    );
-    cliTest(
-      'Source without address is valid',
-      ['codegen', '--skip-migrations'],
-      'validation/source-without-address-is-valid',
-      {
-        exitCode: 0,
-      },
-    );
-    cliTest(
-      'Invalid data source template',
-      ['codegen', '--skip-migrations'],
-      'validation/invalid-data-source-template',
-      { exitCode: 1 },
-    );
-    cliTest(
-      'BigDecimal is a valid type',
-      ['codegen', '--skip-migrations'],
-      'validation/big-decimal-is-valid',
-      {
-        exitCode: 0,
-      },
-    );
-    cliTest(
-      'topic0 is valid in an event handler',
-      ['codegen', '--skip-migrations'],
-      'validation/topic0-is-valid',
-      {
-        exitCode: 0,
-      },
-    );
-    cliTest(
-      'Ethereum contract data source without handlers',
-      ['codegen', '--skip-migrations'],
-      'validation/ethereum-contract-without-handlers',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'Missing or invalid @derivedFrom fields',
-      ['codegen', '--skip-migrations'],
-      'validation/missing-or-invalid-derived-from-fields',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest(
-      'Deriving from interface-typed fields is allowed',
-      ['codegen', '--skip-migrations'],
-      'validation/derived-from-with-interface',
-      {
-        exitCode: 0,
-      },
-    );
-    cliTest(
-      '@derivedFrom target type missing',
-      ['codegen', '--skip-migrations'],
-      'validation/derived-from-target-type-missing',
-      {
-        exitCode: 1,
-      },
-    );
-    cliTest('NEAR is a valid chain', ['codegen', '--skip-migrations'], 'validation/near-is-valid', {
+    },
+  );
+  cliTest('NEAR is a valid chain', ['codegen', '--skip-migrations'], 'validation/near-is-valid', {
+    exitCode: 0,
+  });
+  cliTest(
+    'Deprecated template format gives nice error',
+    ['codegen', '--skip-migrations'],
+    'validation/nested-template-nice-error',
+    {
       exitCode: 0,
-    });
-    cliTest(
-      'Deprecated template format gives nice error',
-      ['codegen', '--skip-migrations'],
-      'validation/nested-template-nice-error',
-      {
-        exitCode: 0,
-      },
-    );
+    },
+  );
 
-    cliTest(
-      'Duplicate data source name',
-      ['codegen', '--skip-migrations'],
-      'validation/duplicate-data-source-name',
-      {
-        exitCode: 1,
-      },
-    );
+  cliTest(
+    'Duplicate data source name',
+    ['codegen', '--skip-migrations'],
+    'validation/duplicate-data-source-name',
+    {
+      exitCode: 1,
+    },
+  );
 
-    cliTest(
-      'Duplicate template name',
-      ['codegen', '--skip-migrations'],
-      'validation/duplicate-template-name',
-      {
-        exitCode: 1,
-      },
-    );
+  cliTest(
+    'Duplicate template name',
+    ['codegen', '--skip-migrations'],
+    'validation/duplicate-template-name',
+    {
+      exitCode: 1,
+    },
+  );
 
-    cliTest(
-      'No network names (valid)',
-      ['codegen', '--skip-migrations'],
-      'validation/no-network-names',
-      {
-        exitCode: 0,
-      },
-    );
+  cliTest(
+    'No network names (valid)',
+    ['codegen', '--skip-migrations'],
+    'validation/no-network-names',
+    {
+      exitCode: 0,
+    },
+  );
 
-    cliTest(
-      'Conflicting network names',
-      ['codegen', '--skip-migrations'],
-      'validation/conflicting-network-names',
-      {
-        exitCode: 1,
-      },
-    );
+  cliTest(
+    'Conflicting network names',
+    ['codegen', '--skip-migrations'],
+    'validation/conflicting-network-names',
+    {
+      exitCode: 1,
+    },
+  );
 
-    cliTest(
-      'Conflicting protocol names',
-      ['codegen', '--skip-migrations'],
-      'validation/conflicting-protocol-names',
-      {
-        exitCode: 1,
-      },
-    );
+  cliTest(
+    'Conflicting protocol names',
+    ['codegen', '--skip-migrations'],
+    'validation/conflicting-protocol-names',
+    {
+      exitCode: 1,
+    },
+  );
 
-    cliTest(
-      'Invalid @fulltext directive',
-      ['codegen', '--skip-migrations'],
-      'validation/invalid-fulltext-directive',
-      {
-        exitCode: 1,
-      },
-    );
+  cliTest(
+    'Invalid @fulltext directive',
+    ['codegen', '--skip-migrations'],
+    'validation/invalid-fulltext-directive',
+    {
+      exitCode: 1,
+    },
+  );
 
-    cliTest(
-      'Invalid GraphQL schema',
-      ['codegen', '--skip-migrations'],
-      'validation/invalid-graphql-schema',
-      {
-        exitCode: 1,
-      },
-    );
+  cliTest(
+    'Invalid GraphQL schema',
+    ['codegen', '--skip-migrations'],
+    'validation/invalid-graphql-schema',
+    {
+      exitCode: 1,
+    },
+  );
 
-    cliTest(
-      'Should parse indexerHints',
-      ['codegen', '--skip-migrations'],
-      'validation/indexer-hints',
-      {
-        exitCode: 0,
-      },
-    );
-  },
-  {
-    timeout: 60_000,
-  },
-);
+  cliTest(
+    'Should parse indexerHints',
+    ['codegen', '--skip-migrations'],
+    'validation/indexer-hints',
+    {
+      exitCode: 0,
+    },
+  );
+});