fix issues
This commit is contained in:
@@ -9,15 +9,17 @@ describe('RatingDelta', () => {
|
||||
expect(RatingDelta.create(-10).value).toBe(-10);
|
||||
expect(RatingDelta.create(100).value).toBe(100);
|
||||
expect(RatingDelta.create(-100).value).toBe(-100);
|
||||
expect(RatingDelta.create(500).value).toBe(500);
|
||||
expect(RatingDelta.create(-500).value).toBe(-500);
|
||||
expect(RatingDelta.create(50.5).value).toBe(50.5);
|
||||
expect(RatingDelta.create(-50.5).value).toBe(-50.5);
|
||||
});
|
||||
|
||||
it('should throw for values outside range', () => {
|
||||
expect(() => RatingDelta.create(100.1)).toThrow(IdentityDomainValidationError);
|
||||
expect(() => RatingDelta.create(-100.1)).toThrow(IdentityDomainValidationError);
|
||||
expect(() => RatingDelta.create(101)).toThrow(IdentityDomainValidationError);
|
||||
expect(() => RatingDelta.create(-101)).toThrow(IdentityDomainValidationError);
|
||||
expect(() => RatingDelta.create(500.1)).toThrow(IdentityDomainValidationError);
|
||||
expect(() => RatingDelta.create(-500.1)).toThrow(IdentityDomainValidationError);
|
||||
expect(() => RatingDelta.create(501)).toThrow(IdentityDomainValidationError);
|
||||
expect(() => RatingDelta.create(-501)).toThrow(IdentityDomainValidationError);
|
||||
});
|
||||
|
||||
it('should accept zero', () => {
|
||||
|
||||
Reference in New Issue
Block a user