Closed kiwikern closed 5 years ago
Could you provide me with an example and with full stack trace? I just replaced mocha with jest for package's internal tests and everything went fine.
By the way, try version 2.0.0 - I just published it. It has axios instead of request-promise as a dependency, so it can help.
Great! :-) Thank you!
When I import
'telegram-test-api'
in a jest test it will fail withUnable to expose method "then"
.Apparently, this is because jest is not compatible with
request-promise
, see this issue.As a workaround, you can mock out
request-promise
before the import, but then of course the requests won't work.