chore: fix ts errors in build test cases (#23209)