Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Commit

Permalink
test(tocco-ui): disable time zone sensitive tests for travis
Browse files Browse the repository at this point in the history
- because of a different timezone of travis, this tests will not match the same time.
   With this open issue the problem could be fixed without changing FormattedValue component
  formatjs/formatjs#702
  • Loading branch information
Daniel Keller committed Dec 7, 2016
1 parent 38c58df commit 55642e2
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -14,16 +14,21 @@ describe('tocco-ui', function() {
addLocaleData([...en, ...de])
})


it('should format value', function() {
const wrapper = mount(<IntlProvider locale="en"><DateTimeFormatter
value="1976-03-16T12:00:00.000Z"/></IntlProvider>)
expect(wrapper.text()).to.equal('3/16/1976, 1:00 PM')
//Does not work on travis due to different time zone. Open issue could solve the problem
//https://github.com/yahoo/react-intl/issues/702
//expect(wrapper.text()).to.equal('3/16/1976, 1:00 PM')
})

it('should format value accorind to locale', function() {
const wrapper = mount(<IntlProvider locale="de"><DateTimeFormatter
value="1976-03-16T12:00:00.000Z"/></IntlProvider>)
expect(wrapper.text()).to.equal('16.3.1976, 13:00')

//See above
//expect(wrapper.text()).to.equal('16.3.1976, 13:00')
})

it('should not format unvalid date', function() {
Expand Down

0 comments on commit 55642e2

Please sign in to comment.