Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement mock return type #624

Open
lkipke opened this issue Mar 17, 2021 · 0 comments
Open

Implement mock return type #624

lkipke opened this issue Mar 17, 2021 · 0 comments
Labels
enhancement Any addition to this project's existing capabilities

Comments

@lkipke
Copy link
Collaborator

lkipke commented Mar 17, 2021

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 lkipke added the enhancement Any addition to this project's existing capabilities label Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any addition to this project's existing capabilities
Projects
None yet
Development

No branches or pull requests

1 participant