Skip to content

Commit

Permalink
fixed timezone in jest
Browse files Browse the repository at this point in the history
  • Loading branch information
zuffik committed Mar 7, 2023
1 parent c7a5dd2 commit e313da2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import reporter from '@corex/jest/reporter.js'

process.env.TZ = 'UTC';
export default {
...reporter,
verbose: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('SitemapBuilder', () => {
expect(content).toMatchInlineSnapshot(`
"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?>
<urlset xmlns=\\"http://www.sitemaps.org/schemas/sitemap/0.9\\" xmlns:news=\\"http://www.google.com/schemas/sitemap-news/0.9\\" xmlns:xhtml=\\"http://www.w3.org/1999/xhtml\\" xmlns:mobile=\\"http://www.google.com/schemas/sitemap-mobile/1.0\\" xmlns:image=\\"http://www.google.com/schemas/sitemap-image/1.1\\" xmlns:video=\\"http://www.google.com/schemas/sitemap-video/1.1\\">
<url><loc>https://example.com</loc><news:news><news:publication><news:name>The Example Times</news:name><news:language>en</news:language></news:publication><news:publication_date>2008-01-02T00:00:00.000+01:00</news:publication_date><news:title>Companies A&#44; B in Merger Talks</news:title></news:news></url>
<url><loc>https://example.com</loc><news:news><news:publication><news:name>The Example Times</news:name><news:language>en</news:language></news:publication><news:publication_date>2008-01-01T23:00:00.000+00:00</news:publication_date><news:title>Companies A&#44; B in Merger Talks</news:title></news:news></url>
</urlset>"
`)
})
Expand Down Expand Up @@ -144,7 +144,7 @@ describe('SitemapBuilder', () => {
expect(content).toMatchInlineSnapshot(`
"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?>
<urlset xmlns=\\"http://www.sitemaps.org/schemas/sitemap/0.9\\" xmlns:news=\\"http://www.google.com/schemas/sitemap-news/0.9\\" xmlns:xhtml=\\"http://www.w3.org/1999/xhtml\\" xmlns:mobile=\\"http://www.google.com/schemas/sitemap-mobile/1.0\\" xmlns:image=\\"http://www.google.com/schemas/sitemap-image/1.1\\" xmlns:video=\\"http://www.google.com/schemas/sitemap-video/1.1\\">
<url><loc>https://example.com</loc><video:video><video:title>Video title</video:title><video:thumbnail_loc>https://example.com/</video:thumbnail_loc><video:description>Video description</video:description><video:content_loc>https://example.com/</video:content_loc></video:video><video:video><video:title>Grilling steaks for summer</video:title><video:thumbnail_loc>https://example.com/</video:thumbnail_loc><video:description>Alkis shows you how to get perfectly done steaks every time</video:description><video:content_loc>https://example.com/</video:content_loc><video:player_loc>https://example.com/</video:player_loc><video:duration>600</video:duration><video:view_count>1234</video:view_count><video:tag>video</video:tag><video:rating>1.0</video:rating><video:expiration_date>2030-03-02T00:00:00.000+01:00</video:expiration_date><video:publication_date>2020-04-20T00:00:00.000+02:00</video:publication_date><video:family_friendly>yes</video:family_friendly><video:requires_subscription>no</video:requires_subscription><video:live>no</video:live><video:restriction relationship=\\"deny\\">CZ</video:restriction><video:platform relationship=\\"allow\\">web</video:platform><video:uploader info=\\"https://example.com/\\">John Doe</video:uploader></video:video></url>
<url><loc>https://example.com</loc><video:video><video:title>Video title</video:title><video:thumbnail_loc>https://example.com/</video:thumbnail_loc><video:description>Video description</video:description><video:content_loc>https://example.com/</video:content_loc></video:video><video:video><video:title>Grilling steaks for summer</video:title><video:thumbnail_loc>https://example.com/</video:thumbnail_loc><video:description>Alkis shows you how to get perfectly done steaks every time</video:description><video:content_loc>https://example.com/</video:content_loc><video:player_loc>https://example.com/</video:player_loc><video:duration>600</video:duration><video:view_count>1234</video:view_count><video:tag>video</video:tag><video:rating>1.0</video:rating><video:expiration_date>2030-03-01T23:00:00.000+00:00</video:expiration_date><video:publication_date>2020-04-19T22:00:00.000+00:00</video:publication_date><video:family_friendly>yes</video:family_friendly><video:requires_subscription>no</video:requires_subscription><video:live>no</video:live><video:restriction relationship=\\"deny\\">CZ</video:restriction><video:platform relationship=\\"allow\\">web</video:platform><video:uploader info=\\"https://example.com/\\">John Doe</video:uploader></video:video></url>
</urlset>"
`)
})
Expand Down

0 comments on commit e313da2

Please sign in to comment.