Skip to content

Commit

Permalink
test(cypress): Pass SessionApi into the sync service
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <[email protected]>
mejo- committed Nov 26, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7396ce9 commit d1b6741
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cypress/e2e/api/SyncServiceProvider.spec.js
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
*/

import { randUser } from '../../utils/index.js'
import SessionApi from '../../../src/services/SessionApi.js'
import { SyncService } from '../../../src/services/SyncService.js'
import createSyncServiceProvider from '../../../src/services/SyncServiceProvider.js'
import { Doc } from 'yjs'
@@ -39,9 +40,11 @@ describe('Sync service provider', function() {
*/
function createProvider(ydoc) {
const queue = []
const api = new SessionApi()
const syncService = new SyncService({
serialize: () => 'Serialized',
getDocumentState: () => null,
api,
})
syncService.on('opened', () => syncService.startSync())
return createSyncServiceProvider({

0 comments on commit d1b6741

Please sign in to comment.