added cli-covarage tool and fixed more tests

This commit is contained in:
Boki 2025-06-26 14:23:01 -04:00
parent b63e58784c
commit b845a8eade
57 changed files with 11917 additions and 295 deletions

View file

@ -0,0 +1,52 @@
import { describe, it, expect } from 'bun:test';
import * as diExports from '../src/index';
describe('DI Package Exports', () => {
it('should export OperationContext', () => {
expect(diExports.OperationContext).toBeDefined();
});
it('should export pool size calculator', () => {
expect(diExports.calculatePoolSize).toBeDefined();
expect(diExports.getServicePoolSize).toBeDefined();
expect(diExports.getHandlerPoolSize).toBeDefined();
});
it('should export ServiceContainerBuilder', () => {
expect(diExports.ServiceContainerBuilder).toBeDefined();
});
it('should export ServiceLifecycleManager', () => {
expect(diExports.ServiceLifecycleManager).toBeDefined();
});
it('should export ServiceApplication', () => {
expect(diExports.ServiceApplication).toBeDefined();
});
it('should export HandlerScanner', () => {
expect(diExports.HandlerScanner).toBeDefined();
});
it('should export factories', () => {
expect(diExports.CacheFactory).toBeDefined();
});
it('should export schemas', () => {
expect(diExports.appConfigSchema).toBeDefined();
expect(diExports.redisConfigSchema).toBeDefined();
expect(diExports.mongodbConfigSchema).toBeDefined();
expect(diExports.postgresConfigSchema).toBeDefined();
expect(diExports.questdbConfigSchema).toBeDefined();
expect(diExports.proxyConfigSchema).toBeDefined();
expect(diExports.browserConfigSchema).toBeDefined();
expect(diExports.queueConfigSchema).toBeDefined();
});
it('should export type definitions', () => {
// These are type exports - check that the awilix-container module is re-exported
expect(diExports).toBeDefined();
// The types AppConfig, ServiceCradle, etc. are TypeScript types and not runtime values
// We can't test them directly, but we've verified they're exported in the source
});
});