Skip to content

Commit

Permalink
Change: Update list of possible timezones
Browse files Browse the repository at this point in the history
Our list of timezone was added 8 years ago and got no update since then.
To have a more complete list of possible timezone and keep the list up
to date, use the list of timezones from moment.js instead.

Fixes #4308
  • Loading branch information
bjoernricks committed Jan 30, 2025
1 parent c2cf4ed commit ab44b78
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 444 deletions.
10 changes: 6 additions & 4 deletions src/gmp/__tests__/timezones.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import {describe, test, expect} from '@gsa/testing';
import {describe, test, expect, expectTypeOf} from '@gsa/testing';

import timezones from '../timezones';
import {isArray} from '../utils/identity';
Expand All @@ -13,11 +13,13 @@ describe('timezones tests', () => {
expect(isArray(timezones)).toEqual(true);
});

test('should contain objects with name properties', () => {
expect(timezones.length).toBeGreaterThan(0);
test('should contain more then one timezone', () => {
expect(timezones.length).toBeGreaterThan(1);
});

test('should contain timezones as strings', () => {
for (const zone of timezones) {
expect(zone.name).toBeDefined();
expectTypeOf(zone).toBeString();
}
});
});
Loading

0 comments on commit ab44b78

Please sign in to comment.