Debian Codegraph @

tests/moment-timezone/load.js

raw symbols SCIP
1 "use strict";
2
3 var tz = require("../../").tz;
4
5 var DATA = {
6 version : 'test0',
7 zones : [
8 "SomeZone/Pacific|PST PDT|70 80|010101|gE 1E 2k 1E 2k",
9 "SomeZone/Eastern|EST EDT|50 60|010101|rE 1E 2k 1E 2k"
10 ],
11 links : [
12 "SomeZone/Los_Angles|SomeZone/Pacific",
13 "SomeZone/New_York|SomeZone/Eastern"
14 ]
15 };
16
17 exports.load = {
18 load : function (test) {
19 tz.load(DATA);
20
21 test.ok(tz.zone('SomeZone/Pacific'), "Should have data loaded from zones array");
22 test.ok(tz.zone('SomeZone/Eastern'), "Should have data loaded from zones array");
23
24 test.ok(tz.zone('SomeZone/Los_Angles'), "Should have data loaded from links array");
25 test.ok(tz.zone('SomeZone/New_York'), "Should have data loaded from links array");
26
27 test.equal(tz.dataVersion, 'test0', "Should set the moment.tz.dataVersion based on the version property");
28
29 test.done();
30 }
31 };