File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -1179,7 +1179,7 @@ Q1BA,Division 1
11791179Q1BB , Division 2
11801180Q1BBA , Branch A
11811181Q1BBB , Branch B
1182- Q2 , " Deputy Commissioner/Director, "
1182+ Q2 , " Deputy Commissioner/Director"
11831183Q2A , Office of TTS Delivery
11841184Q2A0A , Technology Operations Division
11851185Q2AA , Office of Solutions
Original file line number Diff line number Diff line change @@ -245,8 +245,8 @@ describe("q-expand csv data", () => {
245245 }
246246 } ) ;
247247
248- it ( "is formatted correctly" , async ( ) =>
249- new Promise ( ( resolve ) => {
248+ it ( "is formatted correctly" , async ( ) => {
249+ const invalidCount = await new Promise ( ( resolve ) => {
250250 const rows = [ ] ;
251251
252252 fs . createReadStream ( "config/q-expand.csv" )
@@ -255,9 +255,15 @@ describe("q-expand csv data", () => {
255255 rows . push ( row ) ;
256256 } )
257257 . on ( "end" , ( ) => {
258- const invalid = rows . filter ( ( row ) => row . length !== 2 ) ;
259- expect ( invalid . length ) . toBe ( 0 ) ;
260- resolve ( ) ;
258+ const invalid = rows . filter (
259+ ( row ) =>
260+ row . length !== 2 ||
261+ row . filter ( ( column ) => column . endsWith ( "," ) ) . length > 0 ,
262+ ) ;
263+ resolve ( invalid . length ) ;
261264 } ) ;
262- } ) ) ;
265+ } ) ;
266+
267+ expect ( invalidCount ) . toBe ( 0 ) ;
268+ } ) ;
263269} ) ;
You can’t perform that action at this time.
0 commit comments