Skip to content

Commit

Permalink
tests: Fix guess tests for 2023
Browse files Browse the repository at this point in the history
tz.guess() works by checking offsets starting with <currentYear - 2>.
Some zones had their last transition in 2020, which is now outside
the range of guesses, so their guess answers changed.
  • Loading branch information
gilmoreorless committed Feb 5, 2023
1 parent e501621 commit c83479e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/zones/america/dawson.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["America/Dawson"] = {

"guess:by:offset" : helpers.makeTestGuess("America/Dawson", { offset: true, expect: "America/Whitehorse" }),
"guess:by:offset" : helpers.makeTestGuess("America/Dawson", { offset: true, expect: "America/Phoenix" }),

"guess:by:abbr" : helpers.makeTestGuess("America/Dawson", { abbr: true, expect: "America/Whitehorse" }),
"guess:by:abbr" : helpers.makeTestGuess("America/Dawson", { abbr: true, expect: "America/Phoenix" }),

"1900" : helpers.makeTestYear("America/Dawson", [
["1900-08-20T09:17:40+00:00", "00:17:40", "YST", 540]
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/america/whitehorse.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["America/Whitehorse"] = {

"guess:by:offset" : helpers.makeTestGuess("America/Whitehorse", { offset: true }),
"guess:by:offset" : helpers.makeTestGuess("America/Whitehorse", { offset: true, expect: "America/Phoenix" }),

"guess:by:abbr" : helpers.makeTestGuess("America/Whitehorse", { abbr: true }),
"guess:by:abbr" : helpers.makeTestGuess("America/Whitehorse", { abbr: true, expect: "America/Phoenix" }),

"1900" : helpers.makeTestYear("America/Whitehorse", [
["1900-08-20T09:00:12+00:00", "00:00:12", "YST", 540]
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/antarctica/casey.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Antarctica/Casey"] = {

"guess:by:offset" : helpers.makeTestGuess("Antarctica/Casey", { offset: true }),
"guess:by:offset" : helpers.makeTestGuess("Antarctica/Casey", { offset: true, expect: "Asia/Sakhalin" }),

"guess:by:abbr" : helpers.makeTestGuess("Antarctica/Casey", { abbr: true }),
"guess:by:abbr" : helpers.makeTestGuess("Antarctica/Casey", { abbr: true, expect: "Asia/Sakhalin" }),

"1969" : helpers.makeTestYear("Antarctica/Casey", [
["1969-01-01T00:00:00+00:00", "08:00:00", "+08", -480]
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/canada/yukon.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Canada/Yukon"] = {

"guess:by:offset" : helpers.makeTestGuess("Canada/Yukon", { offset: true, expect: "America/Whitehorse" }),
"guess:by:offset" : helpers.makeTestGuess("Canada/Yukon", { offset: true, expect: "America/Phoenix" }),

"guess:by:abbr" : helpers.makeTestGuess("Canada/Yukon", { abbr: true, expect: "America/Whitehorse" }),
"guess:by:abbr" : helpers.makeTestGuess("Canada/Yukon", { abbr: true, expect: "America/Phoenix" }),

"1900" : helpers.makeTestYear("Canada/Yukon", [
["1900-08-20T09:00:12+00:00", "00:00:12", "YST", 540]
Expand Down
4 changes: 2 additions & 2 deletions tests/zones/europe/volgograd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var helpers = require("../../helpers/helpers");

exports["Europe/Volgograd"] = {

"guess:by:offset" : helpers.makeTestGuess("Europe/Volgograd", { offset: true }),
"guess:by:offset" : helpers.makeTestGuess("Europe/Volgograd", { offset: true, expect: "Europe/Moscow" }),

"guess:by:abbr" : helpers.makeTestGuess("Europe/Volgograd", { abbr: true }),
"guess:by:abbr" : helpers.makeTestGuess("Europe/Volgograd", { abbr: true, expect: "Europe/Moscow" }),

"1920" : helpers.makeTestYear("Europe/Volgograd", [
["1920-01-02T21:02:20+00:00", "00:02:20", "+03", -180]
Expand Down

0 comments on commit c83479e

Please sign in to comment.