Skip to content

Conversation

@iambumblehead
Copy link
Owner

related #300 (comment)

@bosschaert
Copy link

Hi @iambumblehead thanks for taking the time to explain. Again I'm trying to work out the edges and possibilities of esmock so this really helps 😄 I find this a really useful library that I'm intending to use loads of times 👍

I have made a slight change your example here: bosschaert@dbf0a17

Instead of mocking fnimported() I want to mock a method called by fnimported(): fnother(). If I make this seemingly trivial change the test doesn't work any more. Any ideas?

@iambumblehead
Copy link
Owner Author

I want to mock a method called by fnimported(): fnother()

fnother must be imported into module where fnimported is defined.

Possibly there are tricks that would be useful, using this creatively, but I don't use those myself.

@iambumblehead
Copy link
Owner Author

I find this a really useful library that I'm intending to use loads of times 👍

Thank you

@iambumblehead
Copy link
Owner Author

One of the main nodejs developers has stated he is developing a native nodejs mocking utility and hopefully it will be better than esmock.

@iambumblehead
Copy link
Owner Author

related nodejs/node#52848

@iambumblehead iambumblehead deleted the add-bosschaert-demo branch May 23, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants