mirror of https://github.com/tc39/test262.git
Remove duplicate timezone tests
This commit is contained in:
parent
f74cee5f59
commit
e9f424b6fc
|
@ -1,18 +0,0 @@
|
|||
// Copyright (C) 2020 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone.prototype.getoffsetnanosecondsfor
|
||||
description: Appropriate error thrown when argument cannot be converted to Temporal.Instant
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const timeZone = Temporal.TimeZone.from("UTC");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetNanosecondsFor(undefined), "undefined");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetNanosecondsFor(null), "null");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetNanosecondsFor(true), "boolean");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetNanosecondsFor(""), "empty string");
|
||||
assert.throws(TypeError, () => timeZone.getOffsetNanosecondsFor(Symbol()), "Symbol");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetNanosecondsFor(5), "number");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetNanosecondsFor(5n), "bigint");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetNanosecondsFor({}), "plain object");
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (C) 2020 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone.prototype.getoffsetstringfor
|
||||
description: Appropriate error thrown when argument cannot be converted to Temporal.Instant
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const timeZone = Temporal.TimeZone.from("UTC");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetStringFor(undefined), "undefined");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetStringFor(null), "null");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetStringFor(true), "boolean");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetStringFor(""), "string");
|
||||
assert.throws(TypeError, () => timeZone.getOffsetStringFor(Symbol()), "Symbol");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetStringFor(5), "number");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetStringFor(5n), "bigint");
|
||||
assert.throws(RangeError, () => timeZone.getOffsetStringFor({}), "plain object");
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (C) 2020 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone.prototype.getplaindatetimefor
|
||||
description: Appropriate error thrown when argument cannot be converted to Temporal.Instant
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const timeZone = Temporal.TimeZone.from("UTC");
|
||||
assert.throws(RangeError, () => timeZone.getPlainDateTimeFor(undefined), "undefined");
|
||||
assert.throws(RangeError, () => timeZone.getPlainDateTimeFor(null), "null");
|
||||
assert.throws(RangeError, () => timeZone.getPlainDateTimeFor(true), "boolean");
|
||||
assert.throws(RangeError, () => timeZone.getPlainDateTimeFor(""), "empty string");
|
||||
assert.throws(TypeError, () => timeZone.getPlainDateTimeFor(Symbol()), "Symbol");
|
||||
assert.throws(RangeError, () => timeZone.getPlainDateTimeFor(5), "number");
|
||||
assert.throws(RangeError, () => timeZone.getPlainDateTimeFor(5n), "bigint");
|
||||
assert.throws(RangeError, () => timeZone.getPlainDateTimeFor({}), "plain object");
|
Loading…
Reference in New Issue