-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42eee36
commit 8318c61
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
packages/account/src/Configs/__test__/terms-of-use-config.spec.ts
This file contains 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,36 @@ | ||
import termsOfUseConfig from '../terms-of-use-config'; | ||
|
||
jest.mock('@deriv/shared', () => ({ | ||
...jest.requireActual('@deriv/shared'), | ||
getDefaultFields: jest.fn(), | ||
})); | ||
|
||
describe('terms-of-use-config', () => { | ||
const MockComponent = jest.fn(); | ||
|
||
it('should set the is_multi_account value to true', () => { | ||
const account_settings = { | ||
fatca_declaration: 0, | ||
}; | ||
const config = termsOfUseConfig( | ||
{ | ||
real_account_signup_target: 'maltainvest', | ||
account_settings, | ||
}, | ||
MockComponent | ||
); | ||
expect(config.props.is_multi_account).toBeTruthy(); | ||
}); | ||
|
||
it('should set the is_multi_account value to false', () => { | ||
const account_settings = {}; | ||
const config = termsOfUseConfig( | ||
{ | ||
real_account_signup_target: 'maltainvest', | ||
account_settings, | ||
}, | ||
MockComponent | ||
); | ||
expect(config.props.is_multi_account).toBeFalsy(); | ||
}); | ||
}); |
This file contains 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