-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support multiple instance by adding instance id #58
Conversation
Codecov Report
@@ Coverage Diff @@
## master #58 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 15 15
Branches 2 2
=========================================
Hits 15 15 Continue to review full report at Codecov.
|
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.
Still reviewing the tests, but some starting comments!
@@ -1010,6 +1010,14 @@ | |||
"url": "0.10.3", | |||
"uuid": "3.1.0", | |||
"xml2js": "0.4.19" | |||
}, | |||
"dependencies": { | |||
"uuid": { |
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.
we can revert this file now!
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.
Just realized that this uuid is a dependency of a dependency 😂. I've removed package-lock and node_modules and re-run npm install, the current one should be alright.
test/unit/sdk.test.js
Outdated
@@ -140,7 +144,7 @@ describe('sdk', () => { | |||
isSmartcarHosted: false, | |||
code: 'super-secret-code', | |||
error: undefined, | |||
state: 'some-state', | |||
state: window.btoa(`{"instanceId":"${smartcar.instanceId}","originalState":"some-state"}`), |
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 use the getEncodedState()
function for these? If we need to customize the state we can make the helper have a default value:
const getEncodedState = (instanceId, originalState = originalState) => ...
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 idea! Much cleaner.
The rest of the tests look good to me! Just the couple comments above. And we also need to put the right commit message to push up the new version. |
Got it! Thanks so much for reviewing the PR! |
@sankethkatta I tried out in mock ui & found it works as intended. |
🎉 This PR is included in version 2.7.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
authUrl
messageHandler
is executed