This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SCP-3452 chain-index e2e tests (#312)
* SCP-3452: Add chain-index e2e tests * Compile with TS and added linter
- Loading branch information
Showing
24 changed files
with
3,232 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
dist | ||
.eslintrc.js |
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,45 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
'sort-imports-es6-autofix', | ||
], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
settings: { | ||
"import/resolver": { | ||
"typescript": {} | ||
} | ||
}, | ||
rules: { | ||
"no-unused-vars": 0, | ||
"linebreak-style": [ | ||
2, | ||
"unix" | ||
], | ||
"new-cap": 0, | ||
"no-unused-expressions": 0, | ||
"no-useless-constructor": 0, | ||
"sort-imports-es6-autofix/sort-imports-es6": "warn", | ||
"sort-imports": ["warn", { ignoreDeclarationSort: true }], | ||
"@typescript-eslint/no-floating-promises": ["error"], | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
"max-len": ["error", { "code": 120 }], | ||
"@typescript-eslint/ban-types": 0, | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
"@typescript-eslint/no-shadow": ["error"], | ||
"@typescript-eslint/no-unused-vars": ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], | ||
"@typescript-eslint/no-var-requires": 0, | ||
"template-tag-spacing": 0, | ||
'promise/avoid-new': 0, | ||
'consistent-return': 0, // typescript checks return types | ||
"no-shadow": "off", // eslint compains about TS enums hence disable here and enable @typescript-eslint/no-shadow | ||
"import/no-unresolved": 0 | ||
} | ||
}; |
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 @@ | ||
v12.12.0 |
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,15 @@ | ||
# Chain-index end-to-end tests | ||
|
||
## Sanity API tests | ||
|
||
### Pre-requisites: | ||
- You have a testnet instance of chain-index running somewhere | ||
- Chain-index is synced to at least `min_slot` in the environment file `sanity-tests/testnet-env.json` | ||
- Update URL in environment file if needed | ||
|
||
### Run tests: | ||
- `nvm use` (not required for `nix-shell` users) | ||
- `npm i` | ||
- `npm test` | ||
|
||
## CI (todo) |
Oops, something went wrong.