3

I read following question Subscribe is deprecated: Use an observer instead of an error callback

but i have another case

expect(closedSubscription.subscribe).toHaveBeenCalledTimes(2);

lint wrote next error:

subscribe is deprecated: Use an observer instead of a complete callback

How to fix this case?

Denis
  • 69
  • 1
  • 4
  • 1
    I think there is not enough code here to help. Is `closedSubscription.subscribe` a spy? – Joey Gough Jul 16 '19 at 16:09
  • See this thread: https://stackoverflow.com/questions/55472124/subscribe-is-deprecated-use-an-observer-instead-of-an-error-callback – Adithya Sreyaj Jan 02 '20 at 04:42
  • More specifically, scroll down to the answer by magikMaker in the other thread. You can provide an object to give different callbacks, including one for 'complete'. – Katana314 Feb 02 '21 at 14:58

0 Answers0