- Implemented real integration tests in `real-integration.test.ts` to validate the functionality of the DebrosFramework with IPFS and OrbitDB. - Created `RealTestUser` and `RealTestPost` models for testing user and post functionalities. - Developed setup and teardown lifecycle methods for managing the test environment. - Introduced `RealIPFSService` and `RealOrbitDBService` classes for managing IPFS and OrbitDB instances. - Added `PrivateSwarmSetup` for configuring a private IPFS network. - Implemented utility functions for creating and shutting down IPFS and OrbitDB networks. - Created a global test manager for managing test lifecycle and network state. - Updated TypeScript configuration to include test files and exclude them from the main build.
19 lines
492 B
JavaScript
19 lines
492 B
JavaScript
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
roots: ['<rootDir>/tests'],
|
|
testMatch: ['**/__tests__/**/*.ts', '**/?(*.)+(spec|test).ts', '!**/real/**'],
|
|
transform: {
|
|
'^.+\\.ts$': [
|
|
'ts-jest',
|
|
{
|
|
isolatedModules: true,
|
|
},
|
|
],
|
|
},
|
|
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts', '!src/**/index.ts', '!src/examples/**'],
|
|
coverageDirectory: 'coverage',
|
|
coverageReporters: ['text', 'lcov', 'html'],
|
|
testTimeout: 30000,
|
|
};
|