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: 3 comments 13 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
1 reply
@sm3sher
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
9 participants