Conversation
|
|
||
| afterEach(async () => { | ||
| sinon.restore(); | ||
| await clear(); |
There was a problem hiding this comment.
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.
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.
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:
