JavaScript functions, when passed to Objective-C as blocks, will now round-trip back to JavaScript, as the initial function object.#234
Conversation
There was a problem hiding this comment.
You can put the assignment in the if statement to reduce its scope.
|
❌ |
1 similar comment
|
❌ |
There was a problem hiding this comment.
I would suggest to move this to TNSObjCTypes.m where we have tests like:
methodWithNSDatemethodWithNSArraymethodWithNSDictionarymethodWithNSData
which test the same thing (that the returned object is the same). You can make the methodWithSimpleBlock return the block.
Also removing the property from the header won't make the test fail, imo JS properties are a bit brittle.
There was a problem hiding this comment.
imo JS is brittle.
FTFY 😀
We can add an expectation that the block property exists with the in operator, but what you've touched upon is a problem everywhere, not just in this test.
There was a problem hiding this comment.
That's why we try to avoid accessing native properties in our tests.
|
run ci |
|
❌ |
|
The build currently fails with: |
ebc03b0 to
eebe49c
Compare
…roundtrip back to JavaScript, as the initial function object.
eebe49c to
f940cdd
Compare
JavaScript functions, when passed to Objective-C as blocks, will now round-trip back to JavaScript, as the initial function object.
No description provided.