lib/logger.js: Extract logic for creating a
serialized representation of the buffer to be
sent to a separate function, so we may cleanly
augment or override it in the future (for example
if we want to add a signature or checksum to the
transmitted data).
test/logger-instantiation.js: Update tests relating
to count and set of methods in Logger; sort the list of
methods so we can predict the order without having to
run the test once when adding methods.
No explicit test for the extracted function at this
point since it's a trivial internal utility, and the
format returned is implicitly tested by existing tests.
lib/logger.js: Extract logic for creating a serialized representation of the buffer to be sent to a separate function, so we may cleanly augment or override it in the future (for example if we want to add a signature or checksum to the transmitted data).
test/logger-instantiation.js: Update tests relating to count and set of methods in Logger; sort the list of methods so we can predict the order without having to run the test once when adding methods.
No explicit test for the extracted function at this point since it's a trivial internal utility, and the format returned is implicitly tested by existing tests.