Skip to content

Commit

Permalink
indexer-integration-tests: start integration test package
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerner committed May 8, 2024
1 parent cbece82 commit fb2989a
Show file tree
Hide file tree
Showing 14 changed files with 4,238 additions and 749 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,4 @@ yalc.lock
# IDE
.idea/
.envrc
.vscode
4 changes: 4 additions & 0 deletions packages/indexer-integration-tests/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
coverage
*.js
6 changes: 6 additions & 0 deletions packages/indexer-integration-tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier']
}
7 changes: 7 additions & 0 deletions packages/indexer-integration-tests/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"arrowParens": "avoid"
}
18 changes: 18 additions & 0 deletions packages/indexer-integration-tests/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright 2020 The Graph Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 changes: 18 additions & 0 deletions packages/indexer-integration-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Indexer Integration Tests

This package contains integration tests for the indexer. The tests are written in typescript and use the [jest](https://jestjs.io/) testing framework.

They also depend on the `local-network` repository to run a full local network with indexer components.

## Getting started

Dependencies:

- node.js
- yarn
- docker
- docker-compose

## Running the tests

To run the tests, you need to have the `local-network` repository cloned and running. Follow the instructions in the `local-network` repository to set up the local network using docker compose.
17 changes: 17 additions & 0 deletions packages/indexer-integration-tests/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
collectCoverage: true,
forceExit: true,
preset: 'ts-jest',
testEnvironment: 'node',
testPathIgnorePatterns: ['/node_modules/', '/dist/', '.yalc'],
roots: ['<rootDir>/tests'],
transform: {
'^.+\\.ts?$': 'ts-jest',
},
setupFilesAfterEnv: ['jest-extended'],
globals: {
'ts-jest': { 'tsconfig': 'tsconfig.json'},
},
globalSetup: '<rootDir>/src/global-setup.ts',
globalTeardown: '<rootDir>/src/global-teardown.ts',
}
Loading

0 comments on commit fb2989a

Please sign in to comment.