core tests
This commit is contained in:
@@ -387,8 +387,8 @@ describe('AsyncUseCase', () => {
|
||||
const defaultResult = await useCase.execute({ source: 'test-source' });
|
||||
expect(defaultResult.isOk()).toBe(true);
|
||||
const defaultStream = defaultResult.unwrap();
|
||||
expect(defaultStream.chunks).toHaveLength(5);
|
||||
expect(defaultStream.totalSize).toBe(48);
|
||||
expect(defaultStream.chunks).toHaveLength(6);
|
||||
expect(defaultStream.totalSize).toBe(57);
|
||||
expect(defaultStream.source).toBe('test-source');
|
||||
|
||||
// Success case with custom chunk size
|
||||
|
||||
@@ -214,7 +214,7 @@ describe('ErrorReporter', () => {
|
||||
action: 'login',
|
||||
errorName: 'Error',
|
||||
errorMessage: 'Something went wrong',
|
||||
environment: 'development'
|
||||
environment: 'test'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -409,6 +409,8 @@ describe('UseCaseOutputPort', () => {
|
||||
present: (data: { key: string; data: unknown }) => {
|
||||
if (cache.has(data.key)) {
|
||||
cacheHits.push(data.key);
|
||||
// Update cache with new data even if key exists
|
||||
cache.set(data.key, data.data);
|
||||
} else {
|
||||
cacheMisses.push(data.key);
|
||||
cache.set(data.key, data.data);
|
||||
|
||||
Reference in New Issue
Block a user