code quality
This commit is contained in:
@@ -294,7 +294,7 @@ describe('Result', () => {
|
||||
it('should stop chaining on first error', () => {
|
||||
const result = Result.ok(2)
|
||||
.andThen((x) => Result.ok(x * 3))
|
||||
.andThen((x) => Result.err(new Error('stopped here')))
|
||||
.andThen((x) => Result.err(new Error(`stopped at ${x}`)))
|
||||
.andThen((x) => Result.ok(x + 1)); // This should not execute
|
||||
|
||||
expect(result.isErr()).toBe(true);
|
||||
|
||||
@@ -36,14 +36,14 @@ describe('ValueObject', () => {
|
||||
it('should return false when comparing with undefined', () => {
|
||||
const vo = new TestValueObject('test', 42);
|
||||
// Testing that equals method handles undefined gracefully
|
||||
const result = vo.equals as any;
|
||||
const result = vo.equals as (other: unknown) => boolean;
|
||||
expect(result(undefined)).toBe(false);
|
||||
});
|
||||
|
||||
it('should return false when comparing with null', () => {
|
||||
const vo = new TestValueObject('test', 42);
|
||||
// Testing that equals method handles null gracefully
|
||||
const result = vo.equals as any;
|
||||
const result = vo.equals as (other: unknown) => boolean;
|
||||
expect(result(null)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export * from './DomainEvent';
|
||||
export * from './Entity';
|
||||
export * from './Logger';
|
||||
export * from './Option';
|
||||
export * from './Result';
|
||||
export * from './Service';
|
||||
export * from './ValueObject';
|
||||
Reference in New Issue
Block a user