Skip to content

Commit 9c60d4d

Browse files
committed
update tests
1 parent e62b29d commit 9c60d4d

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

packages/cli/src/compiler/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export default class Compiler {
7171

7272
const globalsFile = path.join('@graphprotocol', 'graph-ts', 'global', 'global.ts');
7373
const globalsLib = this.libsDirs.find(item => {
74+
compilerDebug('Checking for globals file in %s', path.join(item, globalsFile));
7475
return fs.existsSync(path.join(item, globalsFile));
7576
});
7677

packages/cli/tests/cli/__snapshots__/validation.test.ts.snap

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -970,14 +970,46 @@ Types generated successfully
970970
`;
971971
972972
exports[`Validation > Subgraph data source with handlers 1`] = `
973-
" Error: Could not locate \`@graphprotocol/graph-ts\` package in parent
974-
directories of subgraph manifest.
973+
"- Load subgraph from subgraph.yaml
974+
✔ Load subgraph from subgraph.yaml
975+
- Load contract ABIs
976+
Load contract ABI from Abi.json
977+
- Load contract ABIs
978+
✔ Load contract ABIs
979+
- Generate types for contract ABIs
980+
Generate types for contract ABI: ExampleContract (Abi.json)
981+
- Generate types for contract ABIs
982+
Write types to generated/ExampleSubgraph/ExampleContract.ts
983+
- Generate types for contract ABIs
984+
✔ Generate types for contract ABIs
985+
- Generate types for data source templates
986+
✔ Generate types for data source templates
987+
- Load data source template ABIs
988+
✔ Load data source template ABIs
989+
- Generate types for data source template ABIs
990+
✔ Generate types for data source template ABIs
991+
- Load GraphQL schema from schema.graphql
992+
✔ Load GraphQL schema from schema.graphql
993+
- Generate types for GraphQL schema
994+
Write types to generated/schema.ts
995+
- Generate types for GraphQL schema
996+
✔ Generate types for GraphQL schema
997+
- Generate types for GraphQL schema
998+
Write types to generated/subgraph-QmbPZENDFo1HQcocaporuVGn7fXpGgba1hUX5TFbBv69tZ.ts
999+
- Generate types for GraphQL schema
1000+
✔ Generate types for GraphQL schema
9751001
"
9761002
`;
9771003
978-
exports[`Validation > Subgraph data source with handlers 2`] = `1`;
1004+
exports[`Validation > Subgraph data source with handlers 2`] = `0`;
1005+
1006+
exports[`Validation > Subgraph data source with handlers 3`] = `
1007+
"Subgraph uses subgraph datasources.
9791008
980-
exports[`Validation > Subgraph data source with handlers 3`] = `""`;
1009+
Types generated successfully
1010+
1011+
"
1012+
`;
9811013
9821014
exports[`Validation > topic0 is valid in an event handler 1`] = `
9831015
"- Load subgraph from subgraph.yaml

packages/cli/tests/cli/validation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe.concurrent(
1414
// );
1515
cliTest(
1616
'Subgraph data source with handlers',
17-
['build', '--skip-migrations'],
17+
['codegen', '--skip-migrations'],
1818
'validation/subgraph-data-source',
1919
{
2020
exitCode: 0,

0 commit comments

Comments
 (0)