|
1 | | -import {of} from 'rxjs'; |
2 | 1 | import {Model} from '../../json-crdt'; |
3 | 2 | import {RpcErrorCodes} from '../../reactive-rpc/common/rpc/caller'; |
4 | 3 | import {setup} from './setup'; |
@@ -287,7 +286,7 @@ describe('blocks.*', () => { |
287 | 286 | await client.call('blocks.create', {id: 'my-block', patches: []}); |
288 | 287 | await tick(11); |
289 | 288 | const emits: any[] = []; |
290 | | - client.call$('blocks.listen', of({id: 'my-block'})).subscribe((data) => emits.push(data)); |
| 289 | + client.call$('blocks.listen', {id: 'my-block'}).subscribe((data) => emits.push(data)); |
291 | 290 | const model = Model.withLogicalClock(); |
292 | 291 | model.api.root({ |
293 | 292 | text: 'Hell', |
@@ -322,7 +321,7 @@ describe('blocks.*', () => { |
322 | 321 | test('can subscribe before block is created', async () => { |
323 | 322 | const {client} = setup(); |
324 | 323 | const emits: any[] = []; |
325 | | - client.call$('blocks.listen', of({id: 'my-block'})).subscribe((data) => emits.push(data)); |
| 324 | + client.call$('blocks.listen', {id: 'my-block'}).subscribe((data) => emits.push(data)); |
326 | 325 | const model = Model.withLogicalClock(); |
327 | 326 | model.api.root({ |
328 | 327 | text: 'Hell', |
@@ -350,7 +349,7 @@ describe('blocks.*', () => { |
350 | 349 | test('can receive deletion events', async () => { |
351 | 350 | const {client} = setup(); |
352 | 351 | const emits: any[] = []; |
353 | | - client.call$('blocks.listen', of({id: 'my-block'})).subscribe((data) => emits.push(data)); |
| 352 | + client.call$('blocks.listen', {id: 'my-block'}).subscribe((data) => emits.push(data)); |
354 | 353 | await client.call('blocks.create', {id: 'my-block', patches: []}); |
355 | 354 | await until(() => emits.length === 1); |
356 | 355 | expect(emits[0].block.seq).toBe(-1); |
|
0 commit comments