Skip to content

Commit 8a2ddae

Browse files
committed
Keep WebSocket lifecycle test callbacks void
1 parent 85be688 commit 8a2ddae

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎packages/react-native/Libraries/WebSocket/__tests__/WebSocket-itest.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ describe('WebSocket', function () {
2828
// $FlowFixMe[prop-missing]
2929
const id = socket._socketId;
3030
const events: Array<string> = [];
31-
socket.onopen = () => events.push('open');
32-
socket.onclose = () => events.push('close');
31+
socket.onopen = () => {
32+
events.push('open');
33+
};
34+
socket.onclose = () => {
35+
events.push('close');
36+
};
3337

3438
socket.close();
3539
DeviceEventEmitter.emit('websocketOpen', {id, protocol: ''});

0 commit comments

Comments
 (0)