cors icon indicating copy to clipboard operation
cors copied to clipboard

Include async functions in origins promise detection

Open oshoemaker opened this issue 5 years ago • 4 comments

Current promise detection does not properly detect async functions in ES2018.

oshoemaker avatar Dec 20 '19 22:12 oshoemaker

@oshoemaker can you add a test for this bug fix?

fengmk2 avatar Dec 21 '19 03:12 fengmk2

@oshoemaker can you add a test for this bug fix?

@fengmk2, I am not really sure how this can be tested. In our case we are using serverless web pack with target ES2018 and ESNext lib. The issue is that the test would succeed/fail based on node version/transpiler settings. So I can incorporate a test but would need to change the test environment in order to actually test this.

Suggestions?

oshoemaker avatar Dec 26 '19 18:12 oshoemaker

I have added a "test" to force it to use the code and resulting output. I am not really sure if there is any other option with the current test configuration. Happy to hear suggestions though.

oshoemaker avatar Dec 26 '19 19:12 oshoemaker

@fengmk2, any update on this?

oshoemaker avatar Jan 15 '20 19:01 oshoemaker