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 <jonas@freesources.org>
  • Loading branch information
mejo- committed Nov 27, 2024
1 parent b7626c9 commit 1830793
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
Expand Up @@ -21,6 +21,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'
Expand Down Expand Up @@ -56,9 +57,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({
Expand Down

0 comments on commit 1830793

Please sign in to comment.