Remove duplicate timezone tests

This commit is contained in:
Aditi 2022-08-04 13:53:04 +05:30 committed by Ms2ger
parent f74cee5f59
commit e9f424b6fc
3 changed files with 0 additions and 54 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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");