test: refactor the code in test-dns-ipv6
Checklist
-
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
test
Description of change
- remove the manual control for functions execution
- use common.mustCall to control the functions execution automatically
- use let and const instead of var