Skip to content

Commit

Permalink
Register TM subscriptions before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Aug 21, 2024
1 parent 928e6a7 commit e71b7bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/unit/threads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,8 @@ describe('Threads 2.0', () => {
threads: [],
next: undefined,
});

threadManager.registerSubscriptions();
});

describe('ThreadManager.reload', () => {
Expand Down Expand Up @@ -767,7 +769,7 @@ describe('Threads 2.0', () => {
// TODO: test merge but instance is the same!
it('replaces state of the existing thread which reports stale state within the threads array', async () => {
// prepare
threadManager.state.next((current) => ({ ...current, threads: [thread], unseenThreadIds: ['t1'] }));
threadManager.state.partialNext({ threads: [thread], unseenThreadIds: ['t1'] });
thread.state.partialNext({ isStateStale: true });

const newThread = new Thread({
Expand Down Expand Up @@ -943,8 +945,6 @@ describe('Threads 2.0', () => {
threads: [newThread],
next: undefined,
});

// ...
});
});
});
Expand Down

0 comments on commit e71b7bc

Please sign in to comment.