-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(core): update detectable user agent for getClientInfo #12661
Conversation
|
||
import { getClientInfo } from '../../../src/utils/getClientInfo/getClientInfo'; | ||
|
||
const testCases: [string, string, object][] = [ |
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.
Q: Would it be helpful to use this API (or something similar) to keep this test case up to date automatically?
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.
Could add this as a canary test item.
packages/core/__tests__/utils/getClientInfo/getClientInfo.test.ts
Outdated
Show resolved
Hide resolved
packages/core/__tests__/utils/getClientInfo/getClientInfo.test.ts
Outdated
Show resolved
Hide resolved
|
||
import { getClientInfo } from '../../../src/utils/getClientInfo/getClientInfo'; | ||
|
||
const testCases: [string, string, object][] = [ |
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.
Nit: Move to some testUtils/testCases.ts
file?
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.
These test cases are tight to this particular suite, I don't think it will be reused elsewhere... keeping inline should be fine? 😅
6bbe415
to
a4f1f41
Compare
a4f1f41
to
c855ef5
Compare
Description of changes
Issue #, if available
#12650
Description of how you validated changes
Update the regular expressions for detecting user agent.
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.