Skip to content

Commit b3ee10c

Browse files
committed
test(reactive-rpc): 💍 remove of() helper usage
1 parent 7b14376 commit b3ee10c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/server/__tests__/blocks.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {of} from 'rxjs';
21
import {Model} from '../../json-crdt';
32
import {RpcErrorCodes} from '../../reactive-rpc/common/rpc/caller';
43
import {setup} from './setup';
@@ -287,7 +286,7 @@ describe('blocks.*', () => {
287286
await client.call('blocks.create', {id: 'my-block', patches: []});
288287
await tick(11);
289288
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));
291290
const model = Model.withLogicalClock();
292291
model.api.root({
293292
text: 'Hell',
@@ -322,7 +321,7 @@ describe('blocks.*', () => {
322321
test('can subscribe before block is created', async () => {
323322
const {client} = setup();
324323
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));
326325
const model = Model.withLogicalClock();
327326
model.api.root({
328327
text: 'Hell',
@@ -350,7 +349,7 @@ describe('blocks.*', () => {
350349
test('can receive deletion events', async () => {
351350
const {client} = setup();
352351
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));
354353
await client.call('blocks.create', {id: 'my-block', patches: []});
355354
await until(() => emits.length === 1);
356355
expect(emits[0].block.seq).toBe(-1);

0 commit comments

Comments
 (0)