-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Coverage - Staking Transactions - error path (#25)
* Add StakingTransaction unhappy path unit tests
- Loading branch information
1 parent
efe2b03
commit c482ac6
Showing
8 changed files
with
4,494 additions
and
895 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 |
---|---|---|
|
@@ -4,6 +4,20 @@ orbs: | |
node: circleci/[email protected] | ||
|
||
jobs: | ||
build_and_test: | ||
machine: | ||
image: ubuntu-2204:2024.01.1 | ||
steps: | ||
- checkout | ||
- node/install: | ||
node-version: '21.7' | ||
- run: | ||
name: Install requirements | ||
command: npm install | ||
- run: | ||
name: Run tests | ||
command: npm run tests | ||
|
||
publish: | ||
machine: | ||
image: ubuntu-2204:2024.01.1 | ||
|
@@ -16,14 +30,16 @@ jobs: | |
name: Authenticate with NPM registry | ||
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
- run: | ||
name: Install requirements and publish package | ||
command: | | ||
npm install | ||
npm publish | ||
name: Install requirements | ||
command: npm install | ||
- run: | ||
name: Publish package | ||
command: npm publish | ||
|
||
workflows: | ||
CI: | ||
jobs: | ||
- build_and_test | ||
- require_approval: | ||
type: approval | ||
filters: | ||
|
@@ -32,10 +48,11 @@ workflows: | |
- main | ||
- publish: | ||
requires: | ||
- build_and_test | ||
- require_approval | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
only: | ||
- main | ||
- main |
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,21 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
export default { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
testMatch: ['**/tests/**/*.test.ts', '**/?(*.)+(spec|test).ts'], | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], | ||
transform: { | ||
'^.+\\.tsx?$': [ | ||
'ts-jest', | ||
{ | ||
tsconfig: 'tsconfig.jest.json', | ||
} | ||
] | ||
}, | ||
collectCoverage: true, | ||
collectCoverageFrom: [ | ||
'src/**/*.{ts,tsx}', | ||
'!src/**/*.d.ts' | ||
], | ||
coverageDirectory: 'coverage' | ||
}; |
Oops, something went wrong.