Hi,
I'm trying to switch my test suite to a parallel runner (AVA in this case) but there is some issues with sinon spies. Since this helper use a NodeRED instance from cache, each call to .load() will try to wrap the logger.
I tried to instantiate a new helper for each test, but the root problem is the RED instance.
I have several ideas but I don't know which one to explore:
- This is impossible π’
- Busting
require.cache and create a new RED instance each time π₯
- Test if the logger is already wrapped before wrapping it (or catch exception?) π
- Give the choice to the user to use spy or not π¨βπ
Do you have any advice/feedback for this case? Thank you
Hi,
I'm trying to switch my test suite to a parallel runner (AVA in this case) but there is some issues with sinon spies. Since this helper use a NodeRED instance from cache, each call to
.load()will try to wrap the logger.I tried to instantiate a new helper for each test, but the root problem is the RED instance.
I have several ideas but I don't know which one to explore:
require.cacheand create a new RED instance each time π₯Do you have any advice/feedback for this case? Thank you