mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
use fixed timezone for jest tests
This commit is contained in:
@@ -3,6 +3,13 @@ const rootDir = path.resolve(__dirname, "..");
|
||||
const reportDirectory = path.join(rootDir, "target", "jest-reports");
|
||||
const mockDirectory = path.resolve(__dirname, "src", "__mocks__");
|
||||
|
||||
// Set timezone for tests, this is required to get same date values
|
||||
// accross diferent machines such ci-server and dev box.
|
||||
// We have to set the timezone as soon as possible, because Date will
|
||||
// cache the value.
|
||||
// @see https://stackoverflow.com/questions/56261381/how-do-i-set-a-timezone-in-my-jest-config
|
||||
process.env.TZ = "Europe/Berlin";
|
||||
|
||||
module.exports = {
|
||||
rootDir,
|
||||
transform: {
|
||||
|
||||
Reference in New Issue
Block a user