Add extra test for rejecting pending promises on close

Test that promises on both sides are rejected when the connection
closes