Skip to content
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

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

HuiSF
Copy link
Contributor

@HuiSF HuiSF commented Dec 1, 2023

Description of changes

Issue #, if available

#12650

Description of how you validated changes

Update the regular expressions for detecting user agent.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested review from a team as code owners December 1, 2023 18:34

import { getClientInfo } from '../../../src/utils/getClientInfo/getClientInfo';

const testCases: [string, string, object][] = [
Copy link
Contributor

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?

Copy link
Contributor Author

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.

cshfang
cshfang previously approved these changes Dec 1, 2023

import { getClientInfo } from '../../../src/utils/getClientInfo/getClientInfo';

const testCases: [string, string, object][] = [
Copy link
Contributor

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?

Copy link
Contributor Author

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? 😅

@HuiSF HuiSF force-pushed the hui/feat/core/update-ua-detection branch from a4f1f41 to c855ef5 Compare December 5, 2023 18:24
@HuiSF HuiSF merged commit 829723b into main Dec 5, 2023
30 checks passed
@HuiSF HuiSF deleted the hui/feat/core/update-ua-detection branch December 5, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants