diff --git a/test/built-ins/Temporal/TimeZone/prototype/getNextTransition/instant-string.js b/test/built-ins/Temporal/TimeZone/prototype/getNextTransition/instant-string.js index cce9d82bae..21e04094d0 100644 --- a/test/built-ins/Temporal/TimeZone/prototype/getNextTransition/instant-string.js +++ b/test/built-ins/Temporal/TimeZone/prototype/getNextTransition/instant-string.js @@ -16,9 +16,13 @@ assert.throws(RangeError, () => instance.getNextTransition(str), "date-time + IA // The following are all valid strings so should not throw: -[ +const valids = [ "1970-01-01T00:00Z", "1970-01-01T00:00+01:00", "1970-01-01T00:00Z[America/Vancouver]", "1970-01-01T00:00+01:00[America/Vancouver]", -].forEach((str) => instance.getNextTransition(str)); +]; +for (const str of valids) { + const result = instance.getNextTransition(str); + assert.sameValue(result, null); +} diff --git a/test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/instant-string.js b/test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/instant-string.js index 15dab5701c..42a1e8276f 100644 --- a/test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/instant-string.js +++ b/test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/instant-string.js @@ -16,9 +16,13 @@ assert.throws(RangeError, () => instance.getPreviousTransition(str), "date-time // The following are all valid strings so should not throw: -[ +const valids = [ "1970-01-01T00:00Z", "1970-01-01T00:00+01:00", "1970-01-01T00:00Z[America/Vancouver]", "1970-01-01T00:00+01:00[America/Vancouver]", -].forEach((str) => instance.getPreviousTransition(str)); +]; +for (const str of valids) { + const result = instance.getPreviousTransition(str); + assert.sameValue(result, null); +}