Skip to content

Commit

Permalink
Fix test not passing on machines with different timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Oct 2, 2024
1 parent df2f4de commit 88174c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test_setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ document.body.innerHTML = `

// Mock indexDB
vi.stubGlobal('indexedDB', new IDBFactory());

process.env.TZ = 'UTC';

Check failure on line 18 in test_setup.js

View workflow job for this annotation

GitHub Actions / Run linters

'process' is not defined
3 changes: 1 addition & 2 deletions tests/components/masternode/MasternodeController.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ describe('MasternodeController component tests', () => {
expect(wrapper.find('[data-testid="mnStatus"]').text()).toBe('ENABLED');
expect(wrapper.find('[data-testid="mnNetType"]').text()).toBe('IPV6');
expect(wrapper.find('[data-testid="mnIp"]').text()).toBe('::1');
// Does this rely on time zone?
expect(wrapper.find('[data-testid="mnLastSeen"]').text()).toBe(
'11:22:08 AM'
'9:22:08 AM'
);
});

Expand Down

0 comments on commit 88174c9

Please sign in to comment.