[TS] Fix HTML test runner to properly await and fully check result