/tradesim <position>: This command triggers a trade evolution on the Pokémon in the specified position of the player's party. If the Pokémon also needs to have a held item to evolve, this requirement will be in effect while simulating the trade. If the Pokémon does not evolve by trading it, this command does nothing.
In the current 9.x releases, the features from the former Pixelmon Extras sidemod have been integrated into the main mod. So the "/tradesim" command is natively available, assuming you have cheats active or OP/permission if in multiplayer.
There is also the Linking Cord item, which works the same as that command, but can be obtained without cheats.