Closed mystica2000 closed 1 year ago
The way this will be approached is that file names for all mocks will be kept as generic. In place of actual name of file we will put in a curly brace i.e. {name}
(this is actually how we name files in the Code CMS over at razroo.com/dna so it's consistent across our codebase)
E.g. per examples above
const mockFilePath = 'src/rz/angular/effects/service/{name}.service.ts';
and
const mockFilePath = 'src/rz/angular/effects/component/{name}.component.ts';
Regarding looking up files that will need be ported over there will be no super easy way of approaching this, other than to go through snaps and change over the file names to be generic.
Feel free to take time and space out for this one. Unit tests will complain if done incorrectly so can use that as a guiding light.
Per conversation we will just update the:
const mockFilePath = 'src/rz/angular/effects/service/user-service.ts';
to be
const mockFilePath = 'src/rz/angular/effects/service/user.service.ts';
file and then we will consider this ticket as done
completed
like service effects has "user-service.ts" https://github.com/razroo/codemorph/blob/e38729a87109a3a4c2da023a5339a48f66cbd6ed/src/rz/angular/effects/service/service.spec.ts#L11
But for components, It has "sample.component.ts" https://github.com/razroo/codemorph/blob/e38729a87109a3a4c2da023a5339a48f66cbd6ed/src/rz/angular/effects/component/component-effects.spec.ts#L12