Skip to content

How to mock a module loaded using require() #3134

Answered by cefn
cefn asked this question in Q&A
Discussion options

You must be logged in to vote

Adopting mock-require in the test suite was an effective workaround.

Replies: 4 comments 14 replies

Comment options

You must be logged in to vote
4 replies
@cefn
Comment options

@cefn
Comment options

@djMax
Comment options

@jiovanmichel
Comment options

Comment options

You must be logged in to vote
8 replies
@sm3sher
Comment options

@sheremet-va
Comment options

@sm3sher
Comment options

@binodov
Comment options

@tim-trewartha
Comment options

Answer selected by cefn
Comment options

You must be logged in to vote
2 replies
@sm3sher
Comment options

@viceice
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet