Bring formatting in line with other tests

Other tests similar to these were changed to use a for-of loop, so do the
same here.
This commit is contained in:
Philip Chimento 2021-11-19 15:47:18 -08:00 committed by Rick Waldron
parent 2d1a1b159e
commit 5e9da36a2f
2 changed files with 12 additions and 4 deletions

View File

@ -16,9 +16,13 @@ assert.throws(RangeError, () => instance.getNextTransition(str), "date-time + IA
// The following are all valid strings so should not throw:
[
const valids = [
"1970-01-01T00:00Z",
"1970-01-01T00:00+01:00",
"1970-01-01T00:00Z[America/Vancouver]",
"1970-01-01T00:00+01:00[America/Vancouver]",
].forEach((str) => instance.getNextTransition(str));
];
for (const str of valids) {
const result = instance.getNextTransition(str);
assert.sameValue(result, null);
}

View File

@ -16,9 +16,13 @@ assert.throws(RangeError, () => instance.getPreviousTransition(str), "date-time
// The following are all valid strings so should not throw:
[
const valids = [
"1970-01-01T00:00Z",
"1970-01-01T00:00+01:00",
"1970-01-01T00:00Z[America/Vancouver]",
"1970-01-01T00:00+01:00[America/Vancouver]",
].forEach((str) => instance.getPreviousTransition(str));
];
for (const str of valids) {
const result = instance.getPreviousTransition(str);
assert.sameValue(result, null);
}