Skip to content

Commit a9f4610

Browse files
committed
rm unused helper
1 parent 42bd0f6 commit a9f4610

2 files changed

Lines changed: 1 addition & 20 deletions

File tree

tests/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { WebSocket } from 'ws'
99
import * as Y from 'yjs'
1010
import { Server, ServerConfiguration } from './server'
11-
import { waitForLocalChangesSync, waitForProviderSync } from './util'
11+
import { waitForProviderSync } from './util'
1212

1313
/**
1414
* Wraps `createYjsProvider` with a polyfill for `WebSocket` and

tests/src/util.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,3 @@ export async function waitForProviderSync(provider: YSweetProvider, timeoutMilli
1212
setTimeout(() => reject('Timed out waiting for provider to sync.'), timeoutMillis)
1313
})
1414
}
15-
16-
export async function waitForLocalChangesSync(
17-
provider: YSweetProvider,
18-
timeoutMillis: number = 1_000,
19-
) {
20-
if (!provider.hasLocalChanges) {
21-
return
22-
}
23-
24-
return new Promise<void>((resolve, reject) => {
25-
provider.on(EVENT_LOCAL_CHANGES, (hasLocalChanges) => {
26-
if (!hasLocalChanges) {
27-
resolve()
28-
}
29-
})
30-
31-
setTimeout(() => reject('Timed out waiting for local changes to sync up.'), timeoutMillis)
32-
})
33-
}

0 commit comments

Comments
 (0)