@@ -213,11 +213,10 @@ describe('kefir-test-utils', () => {
213
213
} )
214
214
215
215
describe ( 'sendFrames' , ( ) => {
216
- let log , obs , oldErr
216
+ let log
217
+ const { Error : oldErr } = global
217
218
218
219
beforeEach ( ( ) => {
219
- obs = stream ( )
220
- oldErr = global . Error
221
220
global . Error = class Error { }
222
221
} )
223
222
@@ -226,6 +225,7 @@ describe('kefir-test-utils', () => {
226
225
} )
227
226
228
227
it ( 'should send diagram to observable' , ( ) => {
228
+ const obs = stream ( )
229
229
const events = {
230
230
a : [ value ( 0 ) , value ( 1 ) ] ,
231
231
b : [ value ( 2 ) ] ,
@@ -234,7 +234,7 @@ describe('kefir-test-utils', () => {
234
234
}
235
235
236
236
withFakeTime ( tick => {
237
- log = watchWithTime ( obs )
237
+ log = watchWithTime ( obs ) . log
238
238
239
239
sendFrames ( obs , {
240
240
frames : parseDiagram ( 'ab-c--d---#----7-e|---f' , events ) ,
@@ -356,7 +356,7 @@ describe('kefir-test-utils', () => {
356
356
it ( 'should log values emitted by stream' , ( ) => {
357
357
withFakeTime ( ( ) => {
358
358
const obs = stream ( )
359
- const log = watchWithTime ( obs )
359
+ const { log} = watchWithTime ( obs )
360
360
send ( obs , [ value ( 1 ) , error ( 2 ) , end ( ) ] )
361
361
expect ( log ) . to . deep . equal ( [
362
362
[ 0 , value ( 1 ) ] ,
@@ -366,7 +366,7 @@ describe('kefir-test-utils', () => {
366
366
} )
367
367
} )
368
368
369
- it . skip ( 'should not log values emitted by stream after unwatch' , ( ) => {
369
+ it ( 'should not log values emitted by stream after unwatch' , ( ) => {
370
370
const obs = stream ( )
371
371
const { log, unwatch} = watchWithTime ( obs )
372
372
unwatch ( )
0 commit comments