Skip to content

Commit

Permalink
Fix JS QA
Browse files Browse the repository at this point in the history
  • Loading branch information
widoz committed Feb 15, 2024
1 parent 7aff7bd commit ad9776a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/client/unit/vo/control-option.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import { ControlOption } from '../../../../sources/client/src/vo/control-option'

describe('ControlOption', () => {
it('should create a new ControlOption', () => {
const controlOption = ControlOption.new('label', 'value');
const controlOption = new ControlOption('label', 'value');
expect(controlOption.label).toBe('label');
expect(controlOption.value).toBe('value');
});

it('should throw an error when creating a new ControlOption with an empty label', () => {
expect(() => ControlOption.new('', 'value')).toThrow(
expect(() => new ControlOption('', 'value')).toThrow(
'ControlOption: Label must be a non empty string.'
);
});

it('should throw an error when creating a new ControlOption with an empty value', () => {
expect(() => ControlOption.new('label', '')).toThrow(
expect(() => new ControlOption('label', '')).toThrow(
'ControlOption: Value must be a non empty string.'
);
});
Expand Down

0 comments on commit ad9776a

Please sign in to comment.