Definitely a bug but it's working because networks.defaultClientPort is undefined and the constructor for Peer sets the default port to 8333 in this case.  It should work for livenet and fail for test