-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add initial SmartTransactionsController #1
Conversation
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.
Looks good to me!
expect(pollSpy).toHaveBeenCalledTimes(1); | ||
expect(updateSmartTransactionsSpy).toHaveBeenCalledTimes(1); | ||
await smartTransactionsController.stop(); | ||
jest.useFakeTimers(); |
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.
+1
}); | ||
|
||
describe('setOptInState', () => { | ||
it('should set optIn 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.
Just a little thing, but I like to avoid the word should
in test titles, since it sounds a bit unsure. In this case I would use something like: it('sets optIn state', () => {
if (!allowedNetworks.includes(chainId)) { | ||
return; | ||
} | ||
await util.safelyExecute(() => this.updateSmartTransactions()); |
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 the safelyExecute
fn do?
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.
Execute and return an asynchronous operation without throwing errors
No description provided.