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

Add separate module for mock data generator or handle the mock data for Unit Testing purpose. #19

Open
HanumantappaBudihal opened this issue Jan 17, 2021 · 0 comments
Assignees
Labels
code improvement SCDG - Simple ,Clean ,Dynamic and Generic. Keep the code simple, clean ,dynamic and generic. enhancement New feature or request
Milestone

Comments

@HanumantappaBudihal
Copy link
Contributor

I notified something about the mock data preparation in test methods. Can we make more dynamic way to handle the mock data for unit testing purpose ? It's good have a some kind of mock data generator or mock data handler as separate module.

Input test data and expected result should feed from mock generator , so that we can add the different cases to unit test method just adding the different test data instead of writing each unit test method for each cases. And also it help us to use the common test data between different modules.

Line number from 77 to 60 in event.test.ts

" const mockEvents = [
{ "section": "system", "method": "ExtrinsicSuccess" }, { "section": "system", "method": "ExtrinsicSuccess" },
{ "section": "system", "method": "ExtrinsicFailed" }, { "section": "system", "method": "ExtrinsicFailed" },
{ "section": "balance", "method": "ExtrinsicFailed" }, { "section": "balance", "method": "ExtrinsicFailed" },
]; ];"

image

@HanumantappaBudihal HanumantappaBudihal added enhancement New feature or request code improvement SCDG - Simple ,Clean ,Dynamic and Generic. Keep the code simple, clean ,dynamic and generic. labels Jan 17, 2021
@HanumantappaBudihal HanumantappaBudihal added this to the Milestone 1 milestone Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code improvement SCDG - Simple ,Clean ,Dynamic and Generic. Keep the code simple, clean ,dynamic and generic. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants