@@ -5,6 +5,8 @@ import {FIO} from '../src/main/FIO'
55import { FStream } from '../src/main/FStream'
66import { testRuntime } from '../src/runtimes/TestRuntime'
77
8+ import { Snapshot } from './internals/Snapshot'
9+
810describe ( 'FStream' , ( ) => {
911 describe ( 'of' , ( ) => {
1012 it ( 'should emit provided values' , ( ) => {
@@ -52,14 +54,19 @@ describe('FStream', () => {
5254 } )
5355
5456 describe ( 'merge' , ( ) => {
55- it . skip ( 'should merge two streams' , ( ) => {
56- const actual = testRuntime ( ) . unsafeExecuteSync (
57- FStream . of ( 1 )
58- . merge ( FStream . of ( 2 ) )
59- . fold ( new Array < number > ( ) , ( ) => true , ( s , a ) => FIO . of ( [ ...s , a ] ) )
57+ it ( 'should merge two streams' , ( ) => {
58+ const actual = new Snapshot ( )
59+ const runtime = testRuntime ( )
60+
61+ runtime . unsafeExecuteSync (
62+ FStream . of ( 'A' )
63+ . merge ( FStream . of ( 'B' ) )
64+ . forEach ( _ => actual . mark ( _ ) )
65+ . provide ( { runtime} )
6066 )
61- const expected = [ 1 , 2 ]
62- assert . deepStrictEqual ( actual , expected )
67+
68+ const expected = [ 'A@1' , 'B@1' ]
69+ assert . deepStrictEqual ( actual . timeline , expected )
6370 } )
6471 } )
6572
0 commit comments