Skip to content

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

@HanumantappaBudihal

Description

@HanumantappaBudihal

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

Metadata

Metadata

Assignees

Labels

code improvementSCDG - Simple ,Clean ,Dynamic and Generic. Keep the code simple, clean ,dynamic and generic.enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions