Skip to content

chore: Convert filemanager commands to TypeScript #1384

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

Merged
merged 3 commits into from
Feb 18, 2025
Merged

Conversation

kemmerle
Copy link
Contributor

Description and Context

In this PR, I've converted the filemanager commands to TypeScript and added basic tests.

Commands

  • filemanager/fetch.ts
  • filemanager/upload.ts

Bucket

  • filemanager.ts

TODO

  • Address feedback

Who to Notify

@brandenrodgers @camden11 @joe-yeager

@kemmerle kemmerle marked this pull request as ready for review February 18, 2025 16:51
camden11
camden11 previously approved these changes Feb 18, 2025
Copy link
Contributor

@camden11 camden11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

joe-yeager
joe-yeager previously approved these changes Feb 18, 2025
Copy link
Contributor

@joe-yeager joe-yeager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit about a comment, but other than that LGTM

jest.mock('yargs');
jest.mock('../../../lib/commonOpts');

// Import this last so mocks apply
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I see we have been adding this comment to the tests, but jest should be hoisting all of the jest.mock function calls to before the imports, so the actual order is irrelevant.

https://jestjs.io/docs/manual-mocks#:~:text=For%20this%20reason%2C%20Jest%20will%20automatically%20hoist%20jest.mock%20calls%20to%20the%20top%20of%20the%20module%20(before%20any%20imports

@kemmerle kemmerle dismissed stale reviews from joe-yeager and camden11 via 708468d February 18, 2025 20:43
@kemmerle kemmerle merged commit d6950eb into main Feb 18, 2025
1 check passed
@kemmerle kemmerle deleted the convert/tspart6 branch February 18, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants