sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
114 stars 43 forks source link

feat(mocks): mockFunction improvements #622

Closed lkipke closed 3 years ago

lkipke commented 3 years ago

Change summary

This improves _brs_.mockFunction in a couple of ways:

  1. Allow calling without passing a substitute/mock (i.e. implicit mock)
  2. Implement _brs_.mockReturnValue (named like jest)
lkipke commented 3 years ago

Change looks great. Is this new API going to be documented in roca?

Yep, definitely will, filed this https://github.com/hulu/roca/issues/81