This creates a function that generates an "execution scope" by executing a given set of files. Then, it returns a function that will execute other files in that execution scope.
This is similar to the existing runInScope extension in that it allows us to lex/parse a set of files once, then use those results for future executions. The benefit of this, though, is that we can use this capability in JS, whereas runInScope is called from Brightscript files.
We can use this in roca to run through our test suite in JS, which will allow us more flexibility in reporting, CLI options, and better error handling.
Change Summary
This creates a function that generates an "execution scope" by executing a given set of files. Then, it returns a function that will execute other files in that execution scope.
This is similar to the existing
runInScope
extension in that it allows us to lex/parse a set of files once, then use those results for future executions. The benefit of this, though, is that we can use this capability in JS, whereasrunInScope
is called from Brightscript files.We can use this in
roca
to run through our test suite in JS, which will allow us more flexibility in reporting, CLI options, and better error handling.