Closed chungyau97 closed 1 year ago
We are trying to keep the GitHub issues list tidy and focused on bugs and feature discussions. This ticket looks like a usage question; please post it to StackOverflow and tag it with sinon
, so the bigger community can help answer your questions.
If you feel that your topic is an issue with Sinon, please open a new ticket and follow the guidelines for reporting an issue.
This is a very nice and seemingly easily reproducible test case, so I would suspect that someone should be able to help you very quickly. There seems to always be someone subscribing to the sinon
label on SO, so I think they should be able to help you out 👍
P.S. Feel free to post a comment here with link to the StackOverflow question+answer.
Describe the bug I'm not able to mock node-cache's get function to return a specific value
To Reproduce Steps to reproduce the behavior:
Below are the functions in cacheService.js:
Below are the unit test in cacheService.test.js
Expected behavior It should return "exampleData" instead of undefined
Screenshots of error
Context (please complete the following information):