test262/test/built-ins/Temporal/Now/plainDateTime/timezone-getoffsetnanosecondsfor-non-method.js
Rick Waldron bb93efdb6b
Automated assertion message update (#3136)
This also required manually fixing the "actual" and "expected" order of many assert.sameValue(...) calls.
2021-08-10 10:40:04 -07:00

16 lines
509 B
JavaScript

// 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: Rejects when `getOffsetNanosecondsFor` property is not a method
features: [Temporal]
---*/
var timeZone = {
getOffsetNanosecondsFor: 7
};
assert.throws(TypeError, function() {
Temporal.Now.plainDateTime('iso8601', timeZone);
}, 'Temporal.Now.plainDateTime("iso8601", timeZone) throws a TypeError exception');