From afaf4965db03d3f722fe73e7eb168111c75a3fc7 Mon Sep 17 00:00:00 2001 From: hemri Date: Thu, 20 Jul 2023 01:46:27 -0600 Subject: [PATCH] Fixed timezone configuration in package tests (#17087) --- ghost/email-service/test/email-renderer.test.js | 4 +++- ghost/slack-notifications/package.json | 2 +- ghost/stats-service/package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ghost/email-service/test/email-renderer.test.js b/ghost/email-service/test/email-renderer.test.js index 617f302b63..e218f6e168 100644 --- a/ghost/email-service/test/email-renderer.test.js +++ b/ghost/email-service/test/email-renderer.test.js @@ -1597,7 +1597,9 @@ describe('Email renderer', function () { let emailRenderer; beforeEach(function () { - settings = {}; + settings = { + timezone: 'Etc/UTC' + }; labsEnabled = true; emailRenderer = new EmailRenderer({ audienceFeedbackService: { diff --git a/ghost/slack-notifications/package.json b/ghost/slack-notifications/package.json index ce9b06f3f0..412e870e70 100644 --- a/ghost/slack-notifications/package.json +++ b/ghost/slack-notifications/package.json @@ -7,7 +7,7 @@ "main": "index.js", "scripts": { "dev": "echo \"Implement me!\"", - "test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura mocha './test/**/*.test.js'", + "test:unit": "NODE_ENV=testing TZ=UTC c8 --all --check-coverage --100 --reporter text --reporter cobertura mocha './test/**/*.test.js'", "test": "yarn test:unit", "lint:code": "eslint *.js lib/ --ext .js --cache", "lint": "yarn lint:code && yarn lint:test", diff --git a/ghost/stats-service/package.json b/ghost/stats-service/package.json index 04b82d4379..c0eb59be83 100644 --- a/ghost/stats-service/package.json +++ b/ghost/stats-service/package.json @@ -8,7 +8,7 @@ "main": "index.js", "scripts": { "dev": "echo \"Implement me!\"", - "test:unit": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura mocha './test/**/*.test.js'", + "test:unit": "NODE_ENV=testing TZ=UTC c8 --all --check-coverage --reporter text --reporter cobertura mocha './test/**/*.test.js'", "test": "yarn test:unit", "lint:code": "eslint *.js lib/ --ext .js --cache", "lint": "yarn lint:code && yarn lint:test",