Skip to content

#369 rebuild integration test#379

Open
WeiyuSun wants to merge 17 commits intoGreenstand:masterfrom
WeiyuSun:#369_rebuild_integration_test
Open

#369 rebuild integration test#379
WeiyuSun wants to merge 17 commits intoGreenstand:masterfrom
WeiyuSun:#369_rebuild_integration_test

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