-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix fails on ES6 method syntax in ClientFunction arguments (closes #1279) #1280
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
✅ Tests for the commit 404633b have passed. See details: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/r-
@@ -7,6 +7,7 @@ import { ClientFunctionAPIError } from '../../errors/runtime'; | |||
import MESSAGE from '../../errors/runtime/message'; | |||
|
|||
const ANONYMOUS_FN_RE = /^function\*?\s*\(/; | |||
const ES6_OBJ_METHOD_NAME_RE = /^([A-Za-z\*\$]+)\s*\(/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this regex too weak for function name, e.g. you can use _
or numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
@testcafe-build-bot \retest |
❌ Tests for the commit 8216927 have failed. See details: |
@testcafe-build-bot \retest |
❌ Tests for the commit 8216927 have failed. See details: |
✅ Tests for the commit 8216927 have passed. See details: |
…vExpress#1279) (DevExpress#1280) * Fix fails on ES6 method syntax in ClientFunction arguments (closes DevExpress#1279) * Fix ES6 method determination * Use other solution
\cc @kirovboris @AndreyBelym @AlexanderMoskovkin