The causality of events would be clearer with:

    if (outer.inner.value === true) {
      exports.value = true;
    }

I also think useful to add a comment (above set_javascript_api()) explaining why this code is like this and what we intend to test.