You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to replace the sinon stub with td, but it didn't work with curry functions. Is it supported by td?
//in LanguageTranslationHelpersV2
const deserialize = curry((key, data) => ({
//some data
}))
//in the test
//sinon works with curry function
sinon
.stub(LanguageTranslationHelpersV2, 'deserialize', () => curry(() => ({test: true})))
//tried to rewrite it with td, didn't work.
//error: undefined is not an object (evaluating 'fn(a, _b)')
td.replace(LanguageTranslationHelpersV2, 'deserialize')
td.when(LanguageTranslationHelpersV2.deserialize(td.matchers.anything(), td.matchers.anything()))
.thenDo(() => curry(() => ({test: true})))
The text was updated successfully, but these errors were encountered:
What is defining curry in this case? Sorry, I'm familiar with the concept of currying, but I don't know what curry is in your case. It'd be very helpful if you could put together a published Runkit notebook to reproduce your issue
That makes more sense. If you'd be able to get your example into runkit for us so we can see it in action, that'd defnitely help (apologies for not looking at it closely otherwise, I have not used ramda)
I was trying to replace the sinon stub with td, but it didn't work with curry functions. Is it supported by td?
The text was updated successfully, but these errors were encountered: