Clean up connection test
Summary: Replace the console.error and lack of calling done(), with an explicit expect() call to make failure results clearer. Reviewed By: danielbuechele Differential Revision: D13254777 fbshipit-source-id: 602081323ad3cc1432ddb706f49f036f0fb8926d
This commit is contained in:
committed by
Facebook Github Bot
parent
40f50d48e3
commit
a656c31a70
@@ -55,11 +55,8 @@ test(
|
|||||||
// Make sure client stays connected for some time before passing test
|
// Make sure client stays connected for some time before passing test
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
testFinished = true;
|
testFinished = true;
|
||||||
if (disconnectedTooEarly) {
|
expect(disconnectedTooEarly).toBe(false);
|
||||||
console.error('Client disconnected too early');
|
done();
|
||||||
} else {
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
}, 5000);
|
}, 5000);
|
||||||
});
|
});
|
||||||
server.addListener('removed-client', (id: string) => {
|
server.addListener('removed-client', (id: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user