-
Notifications
You must be signed in to change notification settings - Fork 12
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
test: coin-support-utils createAccount #436
base: develop
Are you sure you want to change the base?
Conversation
|
packages/coin-support-utils/tests/01.common/01.mapDerivationPath/__fixtures__/valid.ts
Outdated
Show resolved
Hide resolved
fixtures.valid.forEach(({ name, input, output }) => { | ||
test(name, () => { | ||
const result = mapDerivationPath(input); | ||
expect(result).toStrictEqual(output); | ||
}); | ||
}); |
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.
This needs negative test cases as well
...-support-utils/tests/02.createAccount/01.createDerivationPathGenerator/__fixtures__/valid.ts
Outdated
Show resolved
Hide resolved
packages/coin-support-utils/tests/02.createAccount/01.createDerivationPathGenerator/index.ts
Outdated
Show resolved
Hide resolved
packages/coin-support-utils/tests/02.createAccount/01.createDerivationPathGenerator/index.ts
Outdated
Show resolved
Hide resolved
packages/coin-support-utils/tests/02.createAccount/04.generateAddressesPerScheme/index.ts
Outdated
Show resolved
Hide resolved
}); | ||
|
||
test('should create new accounts', done => { | ||
db.account.getAll.mockResolvedValue([]); |
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.
We need this test to be configurable. Currently only one test case of this kind can be ran which is hardcoded in __mocks__/createAccountParams
const observer: Observer<ICreateAccountEvent> = { | ||
next: value => { | ||
if (value.type === 'Account') { | ||
expect(value.account).toBeDefined(); |
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.
Need to check if we getting the correct result
packages/coin-support-utils/tests/02.createAccount/05.makeCreateAccountsObservable/index.ts
Outdated
Show resolved
Hide resolved
packages/coin-support-utils/tests/02.createAccount/05.makeCreateAccountsObservable/index.ts
Outdated
Show resolved
Hide resolved
…dable Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
Co-authored-by: Irshad Ansari <[email protected]>
No description provided.