forked from tc39/test262
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporal: Move tests for getNext/PreviousTransition into ZonedDateTime
- Loading branch information
Showing
21 changed files
with
157 additions
and
341 deletions.
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
test/built-ins/Temporal/TimeZone/prototype/getNextTransition/branding.js
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
test/built-ins/Temporal/TimeZone/prototype/getNextTransition/builtin.js
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
test/built-ins/Temporal/TimeZone/prototype/getNextTransition/length.js
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
test/built-ins/Temporal/TimeZone/prototype/getNextTransition/name.js
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
test/built-ins/Temporal/TimeZone/prototype/getNextTransition/not-a-constructor.js
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
test/built-ins/Temporal/TimeZone/prototype/getNextTransition/prop-desc.js
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/branding.js
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
test/built-ins/Temporal/TimeZone/prototype/getPreviousTransition/prop-desc.js
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
test/built-ins/Temporal/ZonedDateTime/prototype/getTimeZoneTransition/branding.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (C) 2021 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.zoneddatetime.prototype.gettimezonetransition | ||
description: Throw a TypeError if the receiver is invalid | ||
features: [Symbol, Temporal] | ||
---*/ | ||
|
||
const getTimeZoneTransition = Temporal.ZonedDateTime.prototype.getTimeZoneTransition; | ||
|
||
assert.sameValue(typeof getTimeZoneTransition, "function"); | ||
|
||
const args = ["next"]; | ||
|
||
assert.throws(TypeError, () => getTimeZoneTransition.apply(undefined, args), "undefined"); | ||
assert.throws(TypeError, () => getTimeZoneTransition.apply(null, args), "null"); | ||
assert.throws(TypeError, () => getTimeZoneTransition.apply(true, args), "true"); | ||
assert.throws(TypeError, () => getTimeZoneTransition.apply("", args), "empty string"); | ||
assert.throws(TypeError, () => getTimeZoneTransition.apply(Symbol(), args), "symbol"); | ||
assert.throws(TypeError, () => getTimeZoneTransition.apply(1, args), "1"); | ||
assert.throws(TypeError, () => getTimeZoneTransition.apply({}, args), "plain object"); | ||
assert.throws(TypeError, () => getTimeZoneTransition.apply(Temporal.ZonedDateTime, args), "Temporal.ZonedDateTime"); | ||
assert.throws(TypeError, () => getTimeZoneTransition.apply(Temporal.ZonedDateTime.prototype, args), "Temporal.ZonedDateTime.prototype"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
test/built-ins/Temporal/ZonedDateTime/prototype/getTimeZoneTransition/prop-desc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (C) 2021 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.zoneddatetime.prototype.gettimezonetransition | ||
description: The "getTimeZoneTransition" property of Temporal.ZonedDateTime.prototype | ||
includes: [propertyHelper.js] | ||
features: [Temporal] | ||
---*/ | ||
|
||
assert.sameValue( | ||
typeof Temporal.ZonedDateTime.prototype.getTimeZoneTransition, | ||
"function", | ||
"`typeof ZonedDateTime.prototype.getTimeZoneTransition` is `function`" | ||
); | ||
|
||
verifyProperty(Temporal.ZonedDateTime.prototype, "getTimeZoneTransition", { | ||
writable: true, | ||
enumerable: false, | ||
configurable: true, | ||
}); |
55 changes: 0 additions & 55 deletions
55
...meZone/prototype/getNextTransition/subtract-second-and-nanosecond-from-last-transition.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.