1 Answer
1

Update: I took a look at the source for remix and noticed they are using a nice library called ethereumjs-vm which implements the Ethereum VM in JavaScript. You can use this to mock your tests programatically.

Original Answer: The closest you can get without touching RPC is the Javascript VM provided by Remix. Here's a screenshot I took running your code using just the in-browser VM provided by Remix: