File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed
packages/cli/src/__tests__/util Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import * as os from 'os';
99import {
1010 readLastLines ,
1111 readJsonLines ,
12- readLastJsonLines ,
1312 fileExists ,
1413 readJson ,
1514} from '../../util/file' ;
@@ -112,20 +111,6 @@ describe('file utilities', () => {
112111 } ) ;
113112 } ) ;
114113
115- describe ( 'readLastJsonLines' , ( ) => {
116- it ( 'should read last N lines and parse as JSON' , ( ) => {
117- const data = Array . from ( { length : 50 } , ( _ , i ) => ( { id : i + 1 } ) ) ;
118- const content = data . map ( obj => JSON . stringify ( obj ) ) . join ( '\n' ) ;
119- fs . writeFileSync ( testJsonlFile , content ) ;
120-
121- const result = readLastJsonLines ( testJsonlFile , 5 ) ;
122-
123- expect ( result ) . toHaveLength ( 5 ) ;
124- expect ( result [ 0 ] . id ) . toBe ( 46 ) ;
125- expect ( result [ 4 ] . id ) . toBe ( 50 ) ;
126- } ) ;
127- } ) ;
128-
129114 describe ( 'fileExists' , ( ) => {
130115 it ( 'should return true for existing file' , ( ) => {
131116 fs . writeFileSync ( testFile , 'test' ) ;
You can’t perform that action at this time.
0 commit comments