Replace for..each loops with for..of

This commit is contained in:
Tobi Schäfer 2023-08-26 22:32:44 +02:00
parent 796a6e7337
commit 0e8f04c0f5
6 changed files with 19 additions and 19 deletions

View file

@ -149,7 +149,7 @@ function testOrder(org, pos) {
function cleanup() {
var persons = root.persons.list();
for each (var person in persons) {
for (let person of persons) {
person.remove();
}
ikea.remove();

View file

@ -86,7 +86,7 @@ function testAdd() {
function cleanup() {
var persons = org.generic.list();
for each (var person in persons) {
for (let person of persons) {
person.remove();
}
org.remove();

View file

@ -68,7 +68,7 @@ function testGroupByAddRemoveNoCommit() {
// FIXME HELMABUG: country is still accessible at this point
// similar to http://helma.org/bugs/show_bug.cgi?id=551
assertNull(root.organisationsByCountry.get(org.country));
assertEqual(countryCount, root.organisationsByCountry.count());
}
@ -130,7 +130,7 @@ function testGroupTransient() {
assertNotNull(country);
assertEqual(country._prototype, "Country");
assertEqual(country.groupname, org.country);
// These don't work as org uses the parent from type.properties
// which is root.organisations. Not sure if this is a bug or not.
// assertEqual(country, org._parent);
@ -143,7 +143,7 @@ function testGroupTransient() {
function cleanup() {
var orgs = root.organisations.list();
for each (var org in orgs) {
for (let org of orgs) {
org.remove();
}
}
}