For a country to join the European Union is a long and difficult process. The new member state must meet requirements and be approved by existing member states.
What process applies if an existing member state expands its territory? For example, in the German reunification, East Germany joined West Germany. In a hypothetical future scenario, the Republic of Ireland might unify with Northern Ireland re-joining the EU. More contentiously, a hypothetical unification of Romania and Moldova would imply that the territory now controlled by Moldova joins the EU, even though Moldova is still far from meeting the accession criteria and, as of August 2022, negotiations have not yet started.
Suppose that — for example — Romania and Moldova would mutually agree to unify, and organise this such that Moldova accedes to Romania. Normally, if two countries mutually agree to unify under their correct democratic process, other countries would recognise this unification. Does this mean that the EU would "automatically" expand, or can the EU block such a process based on the consideration that the new area is not up to EU standards?