Skip to content

Commit

Permalink
test: chainhook payload ingestion
Browse files Browse the repository at this point in the history
* test: jest config for setting up postgres

* test: chainhook payload ingestion
  • Loading branch information
zone117x authored Nov 1, 2024
1 parent 60d7e6d commit 092806b
Show file tree
Hide file tree
Showing 12 changed files with 1,240 additions and 23 deletions.
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@
"--testTimeout=3600000",
"--runInBand",
"--no-cache",
"--selectProjects",
"unit-tests",
],
"outputCapture": "std",
"console": "internalConsole",
},
{
"type": "node",
"request": "launch",
"name": "Jest: db tests",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"--testTimeout=3600000",
"--runInBand",
"--no-cache",
"--selectProjects",
"db-tests",
],
"outputCapture": "std",
"console": "internalConsole",
Expand Down
21 changes: 16 additions & 5 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
import { createDefaultPreset, type JestConfigWithTsJest } from 'ts-jest';

const transform = { ...createDefaultPreset().transform };
const jestConfig: JestConfigWithTsJest = {
testEnvironment: 'node',
transform: {
...createDefaultPreset().transform,
},
testMatch: ['**/tests/unit/**/*.test.ts'],
coverageProvider: 'v8',
collectCoverageFrom: [
'src/**/*.ts',
'migrations/*.ts',
],
coverageProvider: 'v8',
projects: [
{
transform,
displayName: 'unit-tests',
testMatch: ['**/tests/unit/**/*.test.ts'],
},
{
transform,
displayName: 'db-tests',
testMatch: ['**/tests/db/**/*.test.ts'],
globalSetup: './tests/db/jest.setup.ts',
globalTeardown: './tests/db/jest.teardown.ts',
},
]
};

export default jestConfig;
Loading

0 comments on commit 092806b

Please sign in to comment.