Open HenrikSydow opened 1 year ago
Example for creating a mock Image class:
if (Image == null) { // checks if global var, containing image supplied by dom is not defined
var Image = MockImage as any;
}
"Normal" classes do not need a check for null, since they should already be defined.
Implement a way to easily instantiate mock objects. Maybe provide a way to create fake factories instead. (simpler implementation, more control)