-
Notifications
You must be signed in to change notification settings - Fork 265
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: UA string in Node no longer continuously extends #1448
Conversation
test/spec/OktaUserAgent.ts
Outdated
beforeEach(() => { | ||
jest.spyOn(mocked.features, 'isBrowser').mockReturnValue(false); | ||
mocked.isBrowser.mockReturnValue(false); | ||
(global as any).node = NODE_VERSION; |
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.
What does this line do? As I understand, Node version is being read from process.versions.node
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.
That line actually does nothing, I just tested it 🤦
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.
remove before merging if it's not doing anything
const SDK_VERSION = (global as any).SDK_VERSION; | ||
const NODE_VERSION = (global as any).NODE_VERSION; |
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 we augment the global
type locally with these variables so we don't need to cast to any
?
test/spec/OktaUserAgent.ts
Outdated
beforeEach(() => { | ||
jest.spyOn(mocked.features, 'isBrowser').mockReturnValue(false); | ||
mocked.isBrowser.mockReturnValue(false); | ||
(global as any).node = NODE_VERSION; |
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.
remove before merging if it's not doing anything
No description provided.