Skip to content

Commit

Permalink
Merge pull request #1112 from nextcloud-libraries/test/fix-mtime-tz
Browse files Browse the repository at this point in the history
test: Ensure time zone dependent tests run identically across environments
  • Loading branch information
Pytal authored Nov 6, 2024
2 parents f82f46c + 89472ae commit bf0b432
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions __tests__/test-global-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

export const setup = () => {
process.env.TZ = 'UTC'
}
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default async (env) => {
provider: 'istanbul',
reporter: ['lcov', 'text'],
},
globalSetup: '__tests__/test-global-setup.ts',
}
delete cfg.define
return cfg
Expand Down

0 comments on commit bf0b432

Please sign in to comment.