diff --git a/test/www/jxcore/bv_tests/testThaliMobile.js b/test/www/jxcore/bv_tests/testThaliMobile.js
index <HASH>..<HASH> 100644
--- a/test/www/jxcore/bv_tests/testThaliMobile.js
+++ b/test/www/jxcore/bv_tests/testThaliMobile.js
@@ -391,6 +391,10 @@ test('peer is marked unavailable if port number changes', function (t) {
         t.equals(peer.portNumber, somePort + 1,
           'port number must match');
         checkPeer(t, peer, true);
+        ThaliMobile.emitter.removeListener(
+          'peerAvailabilityChanged',
+          availabilityHandler
+        );
         t.end();
       }
     };
Small non-functional change

Remove a listener properly after a test.