Skip to content

Commit

Permalink
tests: Rebuild guess tests for 2024
Browse files Browse the repository at this point in the history
Unfortunately the guess() function is sensitive to changes to the current year.
Ticking over to 2024 means that Fiji now acts the same as other zones for
the date ranges checked. Since it has the largest population, it becomes the
default guess for a whole bunch of Pacific zones.
  • Loading branch information
gilmoreorless committed Feb 3, 2024
1 parent 25f19b6 commit 49fa3a9
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions tests/zones/africa/juba.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Africa/Juba"] = {

"guess:by:offset" : helpers.makeTestGuess("Africa/Juba", { offset: true }),
"guess:by:offset" : helpers.makeTestGuess("Africa/Juba", { offset: true, expect: "Africa/Johannesburg" }),

"guess:by:abbr" : helpers.makeTestGuess("Africa/Juba", { abbr: true }),
"guess:by:abbr" : helpers.makeTestGuess("Africa/Juba", { abbr: true, expect: "Africa/Khartoum" }),

"1930" : helpers.makeTestYear("Africa/Juba", [
["1930-12-31T21:53:31+00:00", "23:59:59", "LMT", -7588 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/asia/anadyr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Asia/Anadyr"] = {

"guess:by:offset" : helpers.makeTestGuess("Asia/Anadyr", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Asia/Anadyr", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Asia/Anadyr", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Asia/Anadyr", { abbr: true, expect: "Pacific/Fiji" }),

"1924" : helpers.makeTestYear("Asia/Anadyr", [
["1924-05-01T12:10:03+00:00", "23:59:59", "LMT", -42596 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/asia/kamchatka.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Asia/Kamchatka"] = {

"guess:by:offset" : helpers.makeTestGuess("Asia/Kamchatka", { offset: true }),
"guess:by:offset" : helpers.makeTestGuess("Asia/Kamchatka", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Asia/Kamchatka", { abbr: true }),
"guess:by:abbr" : helpers.makeTestGuess("Asia/Kamchatka", { abbr: true, expect: "Pacific/Fiji" }),

"1922" : helpers.makeTestYear("Asia/Kamchatka", [
["1922-11-09T13:25:23+00:00", "23:59:59", "LMT", -38076 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/etc/gmt-12.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Etc/GMT-12"] = {

"guess:by:offset" : helpers.makeTestGuess("Etc/GMT-12", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Etc/GMT-12", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Etc/GMT-12", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Etc/GMT-12", { abbr: true, expect: "Pacific/Fiji" }),

"1970" : helpers.makeTestYear("Etc/GMT-12", [
["1970-01-01T00:00:00+00:00", "12:00:00", "+12", -720]
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/kwajalein.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../helpers/helpers");

exports["Kwajalein"] = {

"guess:by:offset" : helpers.makeTestGuess("Kwajalein", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Kwajalein", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Kwajalein", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Kwajalein", { abbr: true, expect: "Pacific/Fiji" }),

"1900" : helpers.makeTestYear("Kwajalein", [
["1900-12-31T12:50:39+00:00", "23:59:59", "LMT", -40160 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/pacific/apia.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Pacific/Apia"] = {

"guess:by:offset" : helpers.makeTestGuess("Pacific/Apia", { offset: true }),
"guess:by:offset" : helpers.makeTestGuess("Pacific/Apia", { offset: true, expect: "Pacific/Tongatapu" }),

"guess:by:abbr" : helpers.makeTestGuess("Pacific/Apia", { abbr: true }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Apia", { abbr: true, expect: "Pacific/Tongatapu" }),

"1892" : helpers.makeTestYear("Pacific/Apia", [
["1892-07-04T11:26:55+00:00", "23:59:59", "LMT", -45184 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/pacific/funafuti.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Pacific/Funafuti"] = {

"guess:by:offset" : helpers.makeTestGuess("Pacific/Funafuti", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Pacific/Funafuti", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Pacific/Funafuti", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Funafuti", { abbr: true, expect: "Pacific/Fiji" }),

"1900" : helpers.makeTestYear("Pacific/Funafuti", [
["1900-12-31T12:27:55+00:00", "23:59:59", "LMT", -41524 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/pacific/kwajalein.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Pacific/Kwajalein"] = {

"guess:by:offset" : helpers.makeTestGuess("Pacific/Kwajalein", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Pacific/Kwajalein", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Pacific/Kwajalein", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Kwajalein", { abbr: true, expect: "Pacific/Fiji" }),

"1900" : helpers.makeTestYear("Pacific/Kwajalein", [
["1900-12-31T12:50:39+00:00", "23:59:59", "LMT", -40160 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/pacific/majuro.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Pacific/Majuro"] = {

"guess:by:offset" : helpers.makeTestGuess("Pacific/Majuro", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Pacific/Majuro", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Pacific/Majuro", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Majuro", { abbr: true, expect: "Pacific/Fiji" }),

"1900" : helpers.makeTestYear("Pacific/Majuro", [
["1900-12-31T12:27:55+00:00", "23:59:59", "LMT", -41524 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/pacific/nauru.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Pacific/Nauru"] = {

"guess:by:offset" : helpers.makeTestGuess("Pacific/Nauru", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Pacific/Nauru", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Pacific/Nauru", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Nauru", { abbr: true, expect: "Pacific/Fiji" }),

"1921" : helpers.makeTestYear("Pacific/Nauru", [
["1921-01-14T12:52:19+00:00", "23:59:59", "LMT", -40060 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/pacific/tarawa.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Pacific/Tarawa"] = {

"guess:by:offset" : helpers.makeTestGuess("Pacific/Tarawa", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Pacific/Tarawa", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Pacific/Tarawa", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Tarawa", { abbr: true, expect: "Pacific/Fiji" }),

"1900" : helpers.makeTestYear("Pacific/Tarawa", [
["1900-12-31T12:27:55+00:00", "23:59:59", "LMT", -41524 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/pacific/wake.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Pacific/Wake"] = {

"guess:by:offset" : helpers.makeTestGuess("Pacific/Wake", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Pacific/Wake", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Pacific/Wake", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Wake", { abbr: true, expect: "Pacific/Fiji" }),

"1900" : helpers.makeTestYear("Pacific/Wake", [
["1900-12-31T12:27:55+00:00", "23:59:59", "LMT", -41524 / 60],
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/pacific/wallis.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Pacific/Wallis"] = {

"guess:by:offset" : helpers.makeTestGuess("Pacific/Wallis", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:offset" : helpers.makeTestGuess("Pacific/Wallis", { offset: true, expect: "Pacific/Fiji" }),

"guess:by:abbr" : helpers.makeTestGuess("Pacific/Wallis", { abbr: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Wallis", { abbr: true, expect: "Pacific/Fiji" }),

"1900" : helpers.makeTestYear("Pacific/Wallis", [
["1900-12-31T12:27:55+00:00", "23:59:59", "LMT", -41524 / 60],
Expand Down

0 comments on commit 49fa3a9

Please sign in to comment.