gristlabs_grist-core/test/client/ui/DocumentSettings.ts
Jarosław Sadziński a52d56f613 (core) Moving client and common tests to core
Summary:
- Moved /test/client and /test/common to core.
- Moved two files (CircularArray and RecentItems) from app/common to core/app/common.
- Moved resetOrg test to gen-server.
- `testrun.sh` is now invoking common and client test from core.
- Added missing packages to core's package.json (and revealed underscore as it is used in the main app).
- Removed Coord.js as it is not used anywhere.

Test Plan: Existing tests

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3590
2022-08-23 19:20:10 +02:00

38 lines
1.1 KiB
TypeScript

/* global describe, it */
import { timezoneOptionsImpl } from "app/client/widgets/TZAutocomplete";
import { assert } from "chai";
import * as momentTimezone from 'moment-timezone';
describe('DocumentSettings', function() {
describe("timezoneOptionsImpl", function() {
it("should return zones in correct order", function() {
// let's test ordering of zones at time the test was written (Tue Jul 18 12:04:56.641 2017)
const now = 1500393896641;
assert.deepEqual(timezoneOptionsImpl(now, [
"Pacific/Marquesas",
"US/Aleutian",
"America/Juneau",
"America/Anchorage",
"Antarctica/Mawson",
"Asia/Calcutta",
"Asia/Colombo",
"Africa/Accra",
"Antarctica/Casey"
], momentTimezone).map(({label}) => label), [
"(GMT-09:30) Pacific/Marquesas",
"(GMT-09:00) US/Aleutian",
"(GMT-08:00) America/Anchorage",
"(GMT-08:00) America/Juneau",
"(GMT+00:00) Africa/Accra",
"(GMT+05:00) Antarctica/Mawson",
"(GMT+05:30) Asia/Calcutta",
"(GMT+05:30) Asia/Colombo",
"(GMT+11:00) Antarctica/Casey"
]);
});
});
});