GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — fix: replace moment with dayjs by touchRED · Pull Request #737 · postlight/parser Conversation
|
|
Nice! There are tons of examples of real-world timestamps in the fixture files which we can test here as well. I think the best we can aim for here is an equal success rate against all those timestamps to what we were getting with moment. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@johnholdun yep i'm running through all the tests now, realized |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const datePublished = cleanDatePublished('published: 1/1/2020'); | ||
|
|
||
| assert.equal(datePublished, moment('1/1/2020', 'MM/DD/YYYY').toISOString()); | ||
| assert.equal(datePublished, dayjs('1/1/2020', 'M/D/YYYY').toISOString()); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I know this is how the old tests were too, but can we change all these expected dates into hard-coded strings? I think that would make the functionality we're testing more clear: we expect strings of varying format and quality, and we always return a string in a specific format.
So this line would become:
assert.equal(datePublished, '2020-01-01T00:00:00.000Z');
I think with that change we could probably remove dayjs as a dependency from this test file entirely.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
exactly, i'll have a commit with these changes shortly ✅
Sorry, something went wrong.
There was an error while loading. Please reload this page.
1b4cc52 to
6a5f892
Compare
bdda1bb to
9cf23f1
Compare
|
@johnholdun clearly the updates we spoke about last week took significantly longer than I expected! Now that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hey is this issue still be worked on? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.