-
Notifications
You must be signed in to change notification settings - Fork 54
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
#369 rebuild integration test #379
base: master
Are you sure you want to change the base?
#369 rebuild integration test #379
Conversation
|
||
afterEach(async () => { | ||
sinon.restore(); | ||
await clear(); |
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.
There is another await clear(). I think you can just put it as the first statement in the beforeEach function, that way there won't be any duplicates
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 do this because I can ensure the database is empty before the whole test starts. And also, I can clean the database after all tests are finished. so that the developer's database does not be contaminated by test data. if we just use beforeEach to clean the database, then after the last test is finished, the data will remain in the database(mysophobia???? lol). do you think this matters? If not, I will change it.
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.
Okay no problem, that's fine
…nhance get wallet test
…js, fix utils and cancel test
# Conflicts: # __tests__/trust-relationship-api.spec.js # __tests__/trust-relationship-send-cancel.spec.js # __tests__/trust-relationship-send-decline.spec.js # __tests__/trust-relationship-send.spec.js
@WeiyuSun can you look at the merge conflicts? |
The wallet-get test has been refactored.
If its good, I will do all refactoring work in this way.
The file structure:
![image](https://private-user-images.githubusercontent.com/98439184/256689411-cb8ce04a-e249-4c72-9324-f41c8c93fa78.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5ODczMzEsIm5iZiI6MTczODk4NzAzMSwicGF0aCI6Ii85ODQzOTE4NC8yNTY2ODk0MTEtY2I4Y2UwNGEtZTI0OS00YzcyLTkzMjQtZjQxYzhjOTNmYTc4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAzNTcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAyNmJmOTk5ZGY1Y2NkYWE4MmRlNTMxMGE5NDdjYTU1YmQzMmVjOTY5NTIxNjIxNDdlMWZkMzRjZjViNTBkZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ab8-FUF_zInsQrGXsMRWWD2OdBMnNW9dsGCkHOSfCHE)