Skip to content

Commit

Permalink
remove spaces between currency value and symbol.
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Vieira committed Dec 18, 2017
1 parent bc10724 commit 7c99ed8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/formatCurrency.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ describe('<FormatCurrency />', function () {

test('should handle the blur event and return formatted value', () => {
const onBlur = sinon.spy();
const wrapper = mountWithIntl(<FormatCurrency key={1} currency="EUR" value={1000} onBlur={onBlur} />);
const wrapper = mountWithIntl(<FormatCurrency currency="EUR" value={1000} onBlur={onBlur} />);
const child = shallowWithIntl(wrapper.get(0));
const input = wrapper.find('input').simulate('blur');
const value = child.dive().state().formattedValue.trim().replace(/\s/g,' ');
const value = child.dive().state().formattedValue.trim().replace(/\s/g,'');

expect(value).toBe('€ 1,000.00');
expect(value.trim()).toBe('€1,000.00');
});
});

0 comments on commit 7c99ed8

Please sign in to comment.