Skip to content
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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

WeiyuSun
Copy link
Contributor

The wallet-get test has been refactored.
If its good, I will do all refactoring work in this way.

The file structure:
image


afterEach(async () => {
sinon.restore();
await clear();
Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Collaborator

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

@Kpoke
Copy link
Collaborator

Kpoke commented Sep 11, 2023

@WeiyuSun can you look at the merge conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants