2021-07-16 15:25:55 +02:00
|
|
|
// Copyright (C) 2021 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
|
|
esid: sec-temporal.now.plaindatetime
|
|
|
|
description: Forwards error when `getOffsetNanosecondsFor` throws
|
|
|
|
features: [Temporal]
|
|
|
|
---*/
|
|
|
|
|
|
|
|
var timeZone = {
|
|
|
|
getOffsetNanosecondsFor() {
|
|
|
|
throw new Test262Error();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
assert.throws(Test262Error, function() {
|
2021-07-20 21:06:31 +02:00
|
|
|
Temporal.Now.plainDateTime('iso8601', timeZone);
|
2021-08-10 19:40:04 +02:00
|
|
|
}, 'Temporal.Now.plainDateTime("iso8601", timeZone) throws a Test262Error exception');
|