function begin_shadow_realm_tests(postMessage) {
        if (!(test_environment instanceof ShadowRealmTestEnvironment)) {
            throw new Error("begin_shadow_realm_tests called in non-Shadow Realm environment");
        }

        test_environment.begin(function (msg) {
            postMessage(JSON.stringify(msg));
        });
    }
Begin running tests in this shadow realm test harness.

To be called after all tests have been loaded; it is an error to call
this more than once or in a non-Shadow Realm environment

@param {Function} postMessage - A function to send test updates to the
incubating realm-- accepts JSON-encoded messages in the format used by
RemoteContext