-
Notifications
You must be signed in to change notification settings - Fork 4k
Remove Onyx.connect() for the key: ONYXKEYS.BANK_ACCOUNT_LIST in src/libs/actions/ReimbursementAccount/store.ts #67521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9fa6878
refactor store.ts to remove usage of Onyx.connect
allgandalf 6bcc300
fix typefailure
allgandalf 1f9ee54
Merge branch 'Expensify:main' into fixstore.ts
allgandalf c5996b3
Merge branch 'main' into fixstore.ts
allgandalf bbc0684
fix lint
allgandalf 377122e
fix prettier
allgandalf 7fa8aa5
Merge branch 'Expensify:main' into fixstore.ts
allgandalf 28f0422
update max warning
allgandalf f785d62
add unit test for hasCreditBankAccount
allgandalf bb1c5da
Merge branch 'Expensify:main' into fixstore.ts
allgandalf 1a587dd
Update package.json
allgandalf f120b97
Merge branch 'Expensify:main' into fixstore.ts
allgandalf d439e49
Update package.json
allgandalf 3cda0fa
Merge branch 'main' into fixstore.ts
allgandalf e3b0bdd
Merge branch 'main' into fixstore.ts
allgandalf 22af0f6
Merge branch 'main' into fixstore.ts
allgandalf 950b3d4
fix typescript failure
allgandalf ca3e409
fix: replace BankAccount with CONST
allgandalf 6c93b7d
fix changed files esLint
allgandalf 936f090
Merge branch 'main' into fixstore.ts
allgandalf 0d817a4
remove unused const
allgandalf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import {hasCreditBankAccount} from '@src/libs/actions/ReimbursementAccount/store'; | ||
| import type {BankAccountList} from '@src/types/onyx'; | ||
|
|
||
| describe('ReimbursementAccountTest', () => { | ||
| describe('hasCreditBankAccount', () => { | ||
| it('should return true if there is a credit bank account', () => { | ||
| const BANK_ACCOUNT_LIST: BankAccountList = { | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| '1': {accountData: {defaultCredit: true}, bankCurrency: 'USD', bankCountry: 'US'}, | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| '2': {accountData: {defaultCredit: false}, bankCurrency: 'USD', bankCountry: 'US'}, | ||
| }; | ||
|
|
||
| const result = hasCreditBankAccount(BANK_ACCOUNT_LIST); | ||
| expect(result).toBe(true); | ||
| }); | ||
|
|
||
| it('should return false if there is no credit bank account', () => { | ||
| const BANK_ACCOUNT_LIST: BankAccountList = { | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| '1': {accountData: {defaultCredit: false}, bankCurrency: 'USD', bankCountry: 'US'}, | ||
| }; | ||
|
|
||
| const result = hasCreditBankAccount(BANK_ACCOUNT_LIST); | ||
| expect(result).toBe(false); | ||
| }); | ||
|
|
||
| it('should return false if there is no bank account list', () => { | ||
| const result = hasCreditBankAccount(undefined); | ||
| expect(result).toBe(false); | ||
| }); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a test to this function please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the tests please review