lively4-core
lively4-core copied to clipboard
aexpr should keep Object.defineProperty config an object
Object.defineProperty(_recorder_.tempfile_js, 'expect', {
get() {
return expect;
},
gets rewritten to:
Object.defineProperty(_recorder_._src_client_reactive_test_active_expression_proxies_active_expression_proxies_spec_js, 'expect', _wrap({
But it should be an Object, and a Proxy raised an error.
out current approach leads to the object in the above mentioned example not being transformed, as specified.
in cases where the configuration object for defineProperty
is not is not defined in the argument itself but rather represente with an identifier, our current approach still transform the object, as in the following example:
let config = {
get() {
return expect;
}
Object.defineProperty(_recorder_.tempfile_js, 'expect', config)
@niconomaa Have you synced this functionality already? @JensLincke can you check, whether this resolves our issue?
@onsetsu yes
an alternative approach that we would like to discuss is, instead of checking an AST node's parent, checking "downwards" the AST from the CallExpression
in question