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
Describe the feature request
Add Promise support. The package methods are currently returning objects with a then property which make them look like they're returning Promises but are not. This goes against the TS type definitions which clearly indicate that the return type is a Promise!
What you are trying to do
While implementing some integration tests using Jest and MockServer client, I've found that this package doesn't support Promises when I tried to do this:
The Jest expection still passes when an error is returned by verify method because verify is not returning a Promise!
The solution you'd like
Promise support should be added, so that the above example can work. This can be achieved by wrapping the current methods with new Promise((resolve, reject) => {}) (configurable?) or by rewriting the whole package with Promises in mind.
The text was updated successfully, but these errors were encountered:
Describe the feature request
Add Promise support. The package methods are currently returning objects with a
then
property which make them look like they're returning Promises but are not. This goes against the TS type definitions which clearly indicate that the return type is a Promise!What you are trying to do
While implementing some integration tests using Jest and MockServer client, I've found that this package doesn't support Promises when I tried to do this:
The Jest expection still passes when an error is returned by verify method because
verify
is not returning a Promise!The solution you'd like
Promise support should be added, so that the above example can work. This can be achieved by wrapping the current methods with
new Promise((resolve, reject) => {})
(configurable?) or by rewriting the whole package with Promises in mind.The text was updated successfully, but these errors were encountered: