Skip to content

Commit

Permalink
Set timezone manually
Browse files Browse the repository at this point in the history
... so that tests can rely on using the same timezone
  • Loading branch information
veeck committed Apr 7, 2023
1 parent a01ac82 commit c023870
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/automated-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Set timezone"
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "Europe/Berlin"
timezoneMacos: "Europe/Berlin"
timezoneWindows: "Europe/Berlin"
- name: "Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/codecov-test-suites.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Set timezone"
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "Europe/Berlin"
timezoneMacos: "Europe/Berlin"
timezoneWindows: "Europe/Berlin"
- name: "Install dependencies and run coverage"
run: |
Xvfb :99 -screen 0 1024x768x16 &
Expand Down
1 change: 1 addition & 0 deletions tests/unit/modules/default/utils_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ describe("Default modules utils tests", () => {

beforeAll(() => {
jest.useFakeTimers();
moment.tz.setDefault("Europe/Berlin");
});

beforeEach(async () => {
Expand Down

0 comments on commit c023870

Please sign in to comment.