-
Notifications
You must be signed in to change notification settings - Fork 44
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
refactor: Migrate Instance Manager Tests to TypeScript #953
refactor: Migrate Instance Manager Tests to TypeScript #953
Conversation
254cdd0
to
d092629
Compare
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.
tiny nits, otherwise, looks great!
src/sdkRuntimeModels.ts
Outdated
@@ -189,7 +197,7 @@ export interface MParticleWebSDK { | |||
getDeviceId(): string; | |||
setDeviceId(deviceId: string): void; | |||
setSessionAttribute(key: string, value: string): void; | |||
getInstance(): MParticleWebSDK; // TODO: Create a new type for MParticleWebSDKInstance | |||
getInstance(instanceName?: string): MParticleWebSDK; // TODO: Create a new type for MParticleWebSDKInstance |
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.
nice catch on missing argument here!
add an mp work item for this instead please.
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.
I think we should possibly do this as part of https://go.mparticle.com/work/SQDSDKS-4804
src/sdkRuntimeModels.ts
Outdated
@@ -207,6 +215,7 @@ export interface MParticleWebSDK { | |||
ProductActionType: SDKProductActionType; | |||
generateHash(value: string): string; | |||
isIOS?: boolean; | |||
sessionManager: Pick<ISessionManager, 'getSession'>; |
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.
can we also add a work item, or perhaps add to the V3 item about making the public API for this better? perhaps we only need to put getSession on the instance and not require a customer to use mp.sessionManager.getSession(). not a decision, but just something to flag given it's just 1 method.
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.
'Other5', | ||
'Other6', | ||
'Other7', | ||
'Other8', | ||
'Other9', | ||
'Other10', | ||
'MobileNumber', | ||
'PhoneNumber2', | ||
'PhoneNumber3', |
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.
thank you TS
0d6a2a7
to
1cf2faf
Compare
Quality Gate passedIssues Measures |
802b639
into
refactor/ts-migration-blackout-2024
Instructions
development
Summary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)