softlayer / sl-ember-components

An Ember CLI Addon that provides a variety of UI components.
http://softlayer.github.io/sl-ember-components
MIT License
114 stars 27 forks source link

Integration | Component | sl date time: Date values applied correctly #1658

Open notmessenger opened 8 years ago

notmessenger commented 8 years ago

Occurring in https://travis-ci.org/softlayer/sl-ember-components/jobs/117349289

Integration | Component | sl date time: Date values applied correctly

not ok 133 PhantomJS 1.9 - Integration | Component | sl date time: Date values applied correctly
    ---
        actual: >
            2015-12-20
        expected: >
            2015-12-21
        stack: >
                at http://localhost:7357/assets/test-support.js:3426
                at http://localhost:7357/assets/tests.js:8398
                at wrapper (http://localhost:7357/assets/test-support.js:38868)
                at runTest (http://localhost:7357/assets/test-support.js:2763)
                at http://localhost:7357/assets/test-support.js:2748
                at http://localhost:7357/assets/test-support.js:2890
                at process (http://localhost:7357/assets/test-support.js:2550)
                at begin (http://localhost:7357/assets/test-support.js:2532)
                at http://localhost:7357/assets/test-support.js:2592
        message: >
            Default date string matches default date pattern
        Log: |
erangeles commented 8 years ago

taking this.

erangeles commented 8 years ago

@notmessenger this is not reproducible in the v0.12.0 branch(cloned from scratch). can you try re-running the build? all tests pass

notmessenger commented 8 years ago

@erangeles I re-ran the the build with the same results. Are you running the same version of Node? Maybe leap year isn't being taken into account somehow in the date test logic?

notmessenger commented 8 years ago

We have now switched from using TravisCI to CircleCI. This same error occurred in CircleCI in https://circleci.com/gh/notmessenger/sl-ember-components/11 but is now currently passing.

notmessenger commented 8 years ago

At the moment it's looking like this is a difference in the values generated by window.moment().subtract( 3, 'months' ).toISOString() and window.moment().subtract( 3, 'months' ) where if such calls are made late into the evening, near midnight, the former call returns 2016-01-08T04:13:09.856Z while the latter returns 2016-01-07