This change groups similar tests together. Also update `build.sh` to compile .js files. Follow-up-of: #15341 Test-bot: skip