crypto icon indicating copy to clipboard operation
crypto copied to clipboard

Implement mock return type

Open lkipke opened this issue 4 years ago • 0 comments

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.

lkipke avatar Mar 17 '21 16:03 lkipke