Since notifications are called synchronously after a write, we fake it by calling them manually for now. The future plan will be more involved, so some of that is stubbed out.
The deleteTestFiles() function is now added to the Realm object, so that it's easy for the RPC module to handle this as well. We can only do this in testing environments in the future.
An exception was thrown when parsing the JSON when only a string was passed. This is better and no longer uses the Objective-C API for converting the dictionary to a JSValue.
The idea is that we will have an NPM module that should always be required to use the Realm JS API. It will handle the underlying implementation details depending on which environment it is being run in (i.e. JavaScriptCore, Chrome, Node).
The focus here was on stubbing out the machinery required to get React Native Chrome debugging working with the Realm API by leveraging synchronous requests. The app itself will need to run a web server that responds to these requests.