> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# abortTestWebsocketConnectivity()

> Stop an in-progress testWebsocketConnectivity() test early.

`abortTestWebsocketConnectivity()`

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

Stops an in-progress [`testWebsocketConnectivity()`](/reference/daily-js/instance-methods/test-websocket-connectivity) test before it completes. The original `testWebsocketConnectivity()` Promise resolves immediately with partial results — containing information about the regions that were tested up to the abort point — and a [`test-completed`](/reference/daily-js/events/network-events#test-completed) event fires.

If no test is in progress, this method does nothing.

## Return value

`void`

## Example

```javascript theme={null}
const resultPromise = call.testWebsocketConnectivity();

// Abort early if the user cancels
call.abortTestWebsocketConnectivity();

const results = await resultPromise;
console.log(results.result); // 'aborted'
console.log(results.abortedRegions); // regions that were not yet tested when aborted
```

## See also

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [testWebsocketConnectivity()](/reference/daily-js/instance-methods/test-websocket-connectivity)
    * [testNetworkConnectivity()](/reference/daily-js/instance-methods/test-network-connectivity)
    * [abortTestNetworkConnectivity()](/reference/daily-js/instance-methods/abort-test-network-connectivity)
    * [testCallQuality()](/reference/daily-js/instance-methods/test-call-quality)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [test-completed](/reference/daily-js/events/network-events#test-completed)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Network quality](/docs/daily-js/guides/network-quality)
  </Card>
</CardGroup>
