diff --git a/packages/integration/tests/file.spec.ts b/packages/integration/tests/file.spec.ts index 2918ca2..60ee42a 100644 --- a/packages/integration/tests/file.spec.ts +++ b/packages/integration/tests/file.spec.ts @@ -111,22 +111,22 @@ test('test file stream', async () => { await test.stream('stream.txt', 'init'); - // const fileContent = await test.content('stream.txt'); - // fileContent.activateNextOnAppend(); - // - // expect(fileContent).toBeInstanceOf(StreamBehaviorSubject); - // expect(fileContent.getValue()).toBe('init'); - // - // test.stream('stream.txt', '\nupdated'); - // await fileContent.nextStateChange; - // expect(fileContent.getValue()).toBe('init\nupdated'); - // - // await fileContent.unsubscribe(); - // await test.stream('stream.txt', '\nnext'); - // - // await sleep(0.2); - // //content is still the same, since we unsubscribed - // expect(fileContent.value).toBe('init\nupdated'); + const fileContent = await test.content('stream.txt'); + fileContent.activateNextOnAppend(); + + expect(fileContent).toBeInstanceOf(StreamBehaviorSubject); + expect(fileContent.getValue()).toBe('init'); + + test.stream('stream.txt', '\nupdated'); + await fileContent.nextStateChange; + expect(fileContent.getValue()).toBe('init\nupdated'); + + await fileContent.unsubscribe(); + await test.stream('stream.txt', '\nnext'); + + await sleep(0.2); + //content is still the same, since we unsubscribed + expect(fileContent.value).toBe('init\nupdated'); await close(); });