Skip to content

Injecting automapper in unit tests? #416

Answered by nartc
bfahm asked this question in Q&A
Feb 17, 2022 · 2 comments · 10 replies
Discussion options

You must be logged in to vote

@bfahm You should use getMapperToken() utility for the provide there.

If you use InjectMapper('name_goes_here') then use { provide: getMapperToken('name_goes_here'), .. }.
If you use InjectMapper() then use { provide: getMapperToken(), ... }

I can update docs ASAP to mention this. Thank you for asking!

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@micalevisk
Comment options

@nartc
Comment options

@micalevisk
Comment options

@nartc
Comment options

@bfahm
Comment options

Answer selected by bfahm
Comment options

You must be logged in to vote
3 replies
@nartc
Comment options

@micalevisk
Comment options

@BeyondBelief96
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants