-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
113 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
import path from 'path'; | ||
import {getBuildEntries} from './build-controller'; | ||
|
||
describe('build controller', () => { | ||
it('picks up test and export files', () => { | ||
const dir = path.resolve(__dirname, '../../test/build'); | ||
|
||
const entries = getBuildEntries(dir); | ||
|
||
expect(entries['test/mappingHandler.test']).toEqual(path.resolve(dir, './src/test/mappingHandler.test.ts')); | ||
expect(entries.chaintypes).toEqual(path.resolve(dir, './src/chainTypes.ts')); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "polkadot-starter", | ||
"version": "1.0.0", | ||
"description": "This project can be used as a starting point for developing your SubQuery project", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "subql build", | ||
"codegen": "subql codegen", | ||
"start:docker": "docker-compose pull && docker-compose up --remove-orphans", | ||
"dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans", | ||
"prepack": "rm -rf dist && npm run build", | ||
"test": "subql build && subql-node test" | ||
}, | ||
"homepage": "https://github.com/subquery/subql-starter", | ||
"repository": "github:subquery/subql-starter", | ||
"files": [ | ||
"dist", | ||
"schema.graphql", | ||
"project.yaml" | ||
], | ||
"author": "SubQuery Team", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@polkadot/api": "^11", | ||
"@subql/cli": "latest", | ||
"@subql/testing": "latest", | ||
"@subql/types": "latest", | ||
"typescript": "^5.2.2", | ||
"@subql/common-substrate": "^4.0.1" | ||
}, | ||
"resolutions": { | ||
"ipfs-unixfs": "6.0.6" | ||
}, | ||
"exports": { | ||
"chaintypes": "src/chainTypes.ts" | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//Exports all handler functions | ||
// export * from "./mappings/mappingHandlers"; | ||
import '@polkadot/api-augment'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {subqlTest} from '@subql/testing'; | ||
|
||
// See https://academy.subquery.network/build/testing.html | ||
|
||
subqlTest( | ||
'handleTransfer test', // Test name | ||
191, // Block height to test at | ||
[], // Dependent entities | ||
[], // Expected entities | ||
'handleEvent' // handler name | ||
); |