You can do the testing, but for production, using a level shifter is recommended. Otherwise, you could burn the esp32.