test: fix test-datetime-change-notify after daylight change (#31655)

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
trop[bot]
2021-11-01 20:57:41 -04:00
committed by GitHub
parent 7e19dbad6f
commit a630db8c86
2 changed files with 40 additions and 0 deletions

View File

@@ -30,3 +30,4 @@ fix_crash_creating_private_key_with_unsupported_algorithm.patch
fix_remove_expired_dst_root_ca_x3.patch
fix_system_python2_error.patch
fix_event_with_invalid_timestamp_in_trace_log.patch
test_fix_test-datetime-change-notify_after_daylight_change.patch

View File

@@ -0,0 +1,39 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Piotr Rybak <rybak.piotr@yahoo.com>
Date: Sun, 31 Oct 2021 17:58:09 +0900
Subject: test: fix test-datetime-change-notify after daylight change
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add standard timezone name for Dublin without daylight saving
PR-URL: https://github.com/nodejs/node/pull/40684
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
(cherry picked from commit 747ef34fb0c9c1f2924ab1b79ea000c87e67a8eb)
diff --git a/test/parallel/test-datetime-change-notify.js b/test/parallel/test-datetime-change-notify.js
index 9cd6d7abfd898ac6781b04422362a6b459b7dc2c..01843511907077857be22c9bc7e7f8568fc677d1 100644
--- a/test/parallel/test-datetime-change-notify.js
+++ b/test/parallel/test-datetime-change-notify.js
@@ -18,15 +18,15 @@ const cases = [
},
{
timeZone: 'America/New_York',
- expected: /Eastern (Standard|Daylight) Time/,
+ expected: /Eastern (?:Standard|Daylight) Time/,
},
{
timeZone: 'America/Los_Angeles',
- expected: /Pacific (Standard|Daylight) Time/,
+ expected: /Pacific (?:Standard|Daylight) Time/,
},
{
timeZone: 'Europe/Dublin',
- expected: /Irish/,
+ expected: /Irish Standard Time|Greenwich Mean Time/,
},
];