Skip to content

Commit

Permalink
Use correct keys in non-iso-calendars.js
Browse files Browse the repository at this point in the history
Using Object.keys() of the expected values in each case decouples these
tests.
  • Loading branch information
ptomato committed Apr 10, 2024
1 parent 7a77d7c commit be809b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/staging/Intl402/Temporal/old/non-iso-calendars.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,7 @@ var tests = {
}
}
};
var calendars = Object.keys(addMonthsCases);
for (var id of calendars) {
for (var id of Object.keys(addMonthsCases)) {
for (var [unit, {duration, results, startDate}] of Object.entries(tests)) {
var values = results[id];
duration = Temporal.Duration.from(duration);
Expand Down Expand Up @@ -1270,7 +1269,7 @@ var daysInMonthCases = {
}
};
totalNow = 0;
for (var id of calendars) {
for (var id of Object.keys(daysInMonthCases)) {
var {year, leap, days} = daysInMonthCases[id];
var date = hasOutdatedChineseIcuData && (id === "chinese" || id === "dangi") ? undefined : Temporal.PlainDate.from({
year,
Expand Down

0 comments on commit be809b8

Please sign in to comment.