Open JensLincke opened 4 years ago
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
gets rewritten to:
But it should be an Object, and a Proxy raised an error.