Removed forEach from format tests

ie8 doesn't support `[].forEach`, so replace it with a regular for loop.