nuxt-community / feed-module

Everyone deserves RSS, ATOM and JSON feeds!
MIT License
227 stars 36 forks source link

test: switch to snapshot testing #14

Closed EricLemieux closed 6 years ago

EricLemieux commented 6 years ago

Fixes: #10

Changes tests to rely on jest snapshots rather than comparing strings directly within the test.

EricLemieux commented 6 years ago

Strange that it is failing, looks like it is caused by the time being different compared to what I had locally.

From travis:

-         <lastBuildDate>Fri, 14 Jul 2000 04:00:00 GMT</lastBuildDate>
+         <lastBuildDate>Fri, 14 Jul 2000 00:00:00 GMT</lastBuildDate>
EricLemieux commented 6 years ago

I changed the tests to use UTC time zone as the reference for date, which fixes the issue I ran into in the first commit where travis and my local time zone differed causing the tests to fail.

manniL commented 6 years ago

Perfect! Timezones can be hairy sometimes :see_no_evil:

Thanks for the PR! :pray: