crypto
crypto copied to clipboard
Implement mock return type
Summary
(Coming from a discussion in #622)
Currently our mock functions have a results property, which is just a flat array of return values from each call. Now that Brightscript supports try/catch, our mock functions should align to Jest's implementation, where each result in the results array is an object that looks like:
{ type: "throw" | "return", value: <return value> }
Note that this will be a breaking change for mock functions.