Replace for..each loops with for..of
This commit is contained in:
parent
796a6e7337
commit
0e8f04c0f5
6 changed files with 19 additions and 19 deletions
|
@ -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();
|
||||
|
|
2
src/dist/apps/test/tests/HopObjectGeneric.js
vendored
2
src/dist/apps/test/tests/HopObjectGeneric.js
vendored
|
@ -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();
|
||||
|
|
8
src/dist/apps/test/tests/HopObjectGroupBy.js
vendored
8
src/dist/apps/test/tests/HopObjectGroupBy.js
vendored
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue