Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

fix(quickref-cookbook): fix broken date test #1062

Closed
wants to merge 1 commit into from

Conversation

filipesilva
Copy link
Contributor

The date test was failing in different timezones due to dates being localized.

This fix makes the test slightly less robust, but guarantees that it will work in every timezone irrespective of differences between the node env timezone and browser timezone.

/cc @wardbell

it('should display proper movie data', function () {
// We check only a few samples
var expectedSamples = [
{row: 0, column: 0, element: 'img', attr: 'src', value: 'images/hero.png', contains: true},
{row: 0, column: 2, value: 'Celeritas'},
{row: 1, column: 3, value: 'Dec 17, 2015'},
{row: 1, column: 3, value: '2015', contains: true},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it will only fail in Europe one day of the year. LOL. I can live with that.

But this doesn't get to the point which is about whether the date was formatted by the pipe. So I'm going a different way, adding a regex test that will bracket the international date problem.

@wardbell wardbell force-pushed the fix-quickref-test branch 2 times, most recently from 5033f10 to 629c60f Compare April 11, 2016 17:17
The date test was failing in different timezones due to dates being localized.

This fix makes the test slightly less robust, but guarantees that it will work in every timezone irrespective of differences between the node env timezone and browser timezone.
@wardbell wardbell force-pushed the fix-quickref-test branch from 629c60f to f67b290 Compare April 11, 2016 17:18
@wardbell
Copy link
Contributor

Please verify that my amendment works in your timezone. Thx.

@wardbell wardbell closed this in 1ba1407 Apr 11, 2016
@wardbell wardbell deleted the fix-quickref-test branch April 11, 2016 19:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants