-
Notifications
You must be signed in to change notification settings - Fork 4
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
[No Ticket] Cleanup pass and enable strict mode #103
Conversation
const successCallback = (responseAsJson) => { | ||
expect(callCount).to.be.eql(1) | ||
expect(errors).to.be.empty() | ||
expect(responseAsJson).to.be.eql(response) | ||
expect(requestToComplete.url).to.eq('https://idx.liadm.com/idex/unknown/any') | ||
expect(responseAsJson).to.be.eql(response) | ||
expect(callCount).to.be.eql(1) | ||
expect(storageHandler.getCookie('__li_idex_cache')).to.be.eq(JSON.stringify(response)) | ||
expect(storageHandler.getCookie('__li_idex_cache_e30')).to.be.eq(JSON.stringify(response)) |
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.
The cache key for no provided additional parameters changed. (As we are using {}
instead of undefined
)
I don't think this is a problem as we will just re-resolve, but I can revert this change if desired
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 it is fine.
const successCallback = (responseAsJson) => { | ||
expect(callCount).to.be.eql(1) | ||
expect(errors).to.be.empty() | ||
expect(responseAsJson).to.be.eql(response) | ||
expect(requestToComplete.url).to.eq('https://idx.liadm.com/idex/unknown/any') | ||
expect(responseAsJson).to.be.eql(response) | ||
expect(callCount).to.be.eql(1) | ||
expect(storageHandler.getCookie('__li_idex_cache')).to.be.eq(JSON.stringify(response)) | ||
expect(storageHandler.getCookie('__li_idex_cache_e30')).to.be.eq(JSON.stringify(response)) |
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 it is fine.
Have to do a second pass. The PR is too large for one pass. |
stackTrace: _truncate(e.stack), | ||
lineNumber: _asInt(e.lineNumber), | ||
lineColumn: _asInt(e.lineColumn), | ||
columnNumber: _asInt(e.columnNumber), |
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 catch
interface WrappedExternalCallHandler { | ||
ajaxGet: ( | ||
url: string, | ||
onSuccess: (responseText: string, response: unknown) => void, |
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.
onSuccess: (responseText: string, response: unknown) => void, | |
onSuccess: (responseText: string, response ?: unknown) => void, |
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.
no need, the callback will always be provided with the argument
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.
but when it is called it uses only the first param
https://github.com/LiveIntent/live-connect/blob/master/src/pixel/sender.ts#L57
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.
Using only one is fine. The questionmark would signal that the function is only provided 1 argument sometimes, even if it asks for 2.
Short description if any.
Author Todo List:
Ready For Review
status