#Trouble with mocking injected repository in service

1 messages · Page 1 of 1 (latest)

pliant field
#

This is nothing to do with Nest or your mock and everything to do with how jest resolves imports. By default, it won;'t understand absolute imports (imports with src/ as the lead) so you have to set the moduleNameMapper config option to tell Jest what to resolve when it does find a src/ import

#

That, or change over to relative imports

void spade
#

I see, thanks for clarifying, let me try it out