@@ -67,7 +67,6 @@ import {
6767} from '@src/libs/CardUtils' ;
6868import type { CardProgramKey } from '@src/libs/CardUtils' ;
6969import DateUtils from '@src/libs/DateUtils' ;
70- import ONYXKEYS from '@src/ONYXKEYS' ;
7170import type {
7271 BankAccountList ,
7372 Card ,
@@ -1887,34 +1886,19 @@ describe('CardUtils', () => {
18871886 describe ( 'getCSVFeedType' , ( ) => {
18881887 it ( 'returns the first gap when higher-numbered CSV feeds exist in companyCards only' , ( ) => {
18891888 expect (
1890- getCSVFeedType (
1891- {
1892- ccupload3 : { pending : false } ,
1893- ccupload7 : { pending : false } ,
1894- } as CompanyFeeds ,
1895- 111 ,
1896- undefined ,
1897- ) ,
1889+ getCSVFeedType ( {
1890+ ccupload3 : { pending : false } ,
1891+ ccupload7 : { pending : false } ,
1892+ } as CompanyFeeds ) ,
18981893 ) . toBe ( 'ccupload1' ) ;
18991894 } ) ;
19001895
1901- it ( 'treats existing workspace card list keys as used slots' , ( ) => {
1902- const collection = {
1903- [ `${ ONYXKEYS . COLLECTION . WORKSPACE_CARDS_LIST } 111_ccupload3` ] : { cardList : { } } ,
1904- } as OnyxCollection < WorkspaceCardsList > ;
1905- expect ( getCSVFeedType ( undefined , 111 , collection ) ) . toBe ( 'ccupload1' ) ;
1906- } ) ;
1907-
1908- it ( 'merges companyCards and workspace keys when picking the next slot' , ( ) => {
1909- expect (
1910- getCSVFeedType ( { ccupload1 : { pending : false } } as CompanyFeeds , 111 , {
1911- [ `${ ONYXKEYS . COLLECTION . WORKSPACE_CARDS_LIST } 111_ccupload2` ] : { cardList : { } } ,
1912- } as OnyxCollection < WorkspaceCardsList > ) ,
1913- ) . toBe ( 'ccupload3' ) ;
1896+ it ( 'returns ccupload2 when ccupload1 is already in companyCards' , ( ) => {
1897+ expect ( getCSVFeedType ( { ccupload1 : { pending : false } } as CompanyFeeds ) ) . toBe ( 'ccupload2' ) ;
19141898 } ) ;
19151899
19161900 it ( 'returns ccupload1 when no CSV feeds exist' , ( ) => {
1917- expect ( getCSVFeedType ( undefined , 111 , { } ) ) . toBe ( 'ccupload1' ) ;
1901+ expect ( getCSVFeedType ( undefined ) ) . toBe ( 'ccupload1' ) ;
19181902 } ) ;
19191903 } ) ;
19201904
0 commit comments