test: refactor test-dgram-setBroadcast.js
This test wasn't actually working, as sockets were being closed, allowing the test to exit before any assertions were actually run. This commit refactors the test to maintain the same intended semantics.
If anyone is curious, I found this while looking at the code coverage report.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
test