52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
import { describe, expect, it } 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
|
|
});
|
|
});
|