-
Notifications
You must be signed in to change notification settings - Fork 64
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
Convert lib/serverlessLogs and lib/buildAccount to TS #1337
Conversation
|
||
beforeEach(() => { | ||
jest.spyOn(process, 'exit').mockImplementation(() => {}); | ||
stdinMock = mockStdIn.stdin(); | ||
spinnies = { |
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.
This was being passed into tailLogs but not doing anything
portalLimit, // Used only for developer test accounts | ||
force = false, | ||
}) { | ||
export async function buildDeveloperTestAccount( |
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 decided to split buildNewAccount
into two separate functions. It adds a few extra lines of code, but IMO is much easier to read. I don't think there was a ton of utility in combining them previously, since it only combined two account types and would have been super messy if we ever attempted to add a third. It also was more or less impossible to safely type
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.
tested locally and this lgtm!
}) | ||
); | ||
logger.debug(e); |
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.
Not a blocker, but could this use the debugError() util?
Description and Context
Converts 2 more files to TS. Only two more to go after this!
https://git.hubteam.com/HubSpot/hubspot-cli-issues/issues/684
Who to Notify
@brandenrodgers @kecarroll @joe-yeager