File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
redisinsight/api/src/modules/profiler/models Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,15 @@ describe('LogFile', () => {
40
40
} ) ;
41
41
42
42
it ( 'getReadStream' , async ( ) => {
43
+ logFile . getWriteStream ( ) . write ( '' ) ;
43
44
const stream = logFile . getReadStream ( ) ;
44
45
expect ( stream ) . toBeInstanceOf ( ReadStream ) ;
45
46
expect ( stream . destroyed ) . toEqual ( false ) ;
46
- expect ( logFile . getReadStream ( ) ) . not . toEqual ( stream ) ;
47
47
stream . emit ( 'end' ) ;
48
- await new Promise ( ( r ) => setTimeout ( r , 500 ) ) ;
48
+ await new Promise ( ( r ) => setTimeout ( r , 1000 ) ) ;
49
49
expect ( stream . destroyed ) . toEqual ( true ) ;
50
50
expect ( mockProfilerAnalyticsEvents . get ( TelemetryEvents . ProfilerLogDownloaded ) ) . toHaveBeenCalled ( ) ;
51
+ expect ( logFile . getReadStream ( ) ) . not . toEqual ( stream ) ;
51
52
} ) ;
52
53
53
54
it ( 'getEmitter' , ( ) => {
You can’t perform that action at this time.
0 commit comments