diff options
Diffstat (limited to 'js/src/tests/test262/staging/Temporal/TimeZone/old/getNextTransition.js')
-rw-r--r-- | js/src/tests/test262/staging/Temporal/TimeZone/old/getNextTransition.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/tests/test262/staging/Temporal/TimeZone/old/getNextTransition.js b/js/src/tests/test262/staging/Temporal/TimeZone/old/getNextTransition.js new file mode 100644 index 0000000000..50e043ff83 --- /dev/null +++ b/js/src/tests/test262/staging/Temporal/TimeZone/old/getNextTransition.js @@ -0,0 +1,20 @@ +// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal-timezone-objects +description: Temporal.TimeZone.prototype.getNextTransition() works as expected +features: [Temporal] +---*/ + +var noTransitionTZ = Temporal.TimeZone.from("Etc/GMT+10"); + +// should work for timezones with no scheduled transitions in the near future +var start = Temporal.Instant.from("1945-10-15T13:00:00Z"); +assert.sameValue(noTransitionTZ.getNextTransition(start), null); + +// accepts string as argument +assert.sameValue(noTransitionTZ.getNextTransition("2019-04-16T21:01Z"), null); + +reportCompare(0, 0); |