mirror of
https://github.com/tc39/test262.git
synced 2025-07-05 21:24:40 +02:00
Test PlainTime without full ISO strings
Codecov showed that PlainTime strings like "09:00:00Z[UTC]" or "09:00:00Z" were not being tested. This commit fills that gap. It'd probably be good to make similar changes for other Plain* types, but Codecov didn't complain about them so they may be covered via other tests so it was less urgent.
This commit is contained in:
parent
e8bbfe704f
commit
c84752415d
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
const instance = new Temporal.PlainDate(2000, 5, 2);
|
const instance = new Temporal.PlainDate(2000, 5, 2);
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
|
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
const instance = new Temporal.PlainDate(2000, 5, 2);
|
const instance = new Temporal.PlainDate(2000, 5, 2);
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
|
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
const instance = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 987, 654, 321);
|
const instance = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 987, 654, 321);
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
|
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
const plainTime = new Temporal.PlainTime();
|
const plainTime = new Temporal.PlainTime();
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
|
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
assert.throws(
|
assert.throws(
|
||||||
|
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321);
|
const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321);
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
|
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321);
|
const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321);
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
|
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321);
|
const instance = new Temporal.PlainTime(12, 34, 56, 987, 654, 321);
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
|
@ -10,6 +10,8 @@ features: [Temporal, arrow-function]
|
|||||||
const invalidStrings = [
|
const invalidStrings = [
|
||||||
"2019-10-01T09:00:00Z",
|
"2019-10-01T09:00:00Z",
|
||||||
"2019-10-01T09:00:00Z[UTC]",
|
"2019-10-01T09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z[UTC]",
|
||||||
|
"09:00:00Z",
|
||||||
];
|
];
|
||||||
const instance = new Temporal.ZonedDateTime(1_000_000_000_000_000_000n, "UTC");
|
const instance = new Temporal.ZonedDateTime(1_000_000_000_000_000_000n, "UTC");
|
||||||
invalidStrings.forEach((arg) => {
|
invalidStrings.forEach((arg) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user