-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[NoQA] [TS migration] Migrate checkDeployBlockersTest to Typescript #37035
[NoQA] [TS migration] Migrate checkDeployBlockersTest to Typescript #37035
Conversation
import run from '../../.github/actions/javascript/checkDeployBlockers/checkDeployBlockers'; | ||
import GithubUtils from '../../.github/libs/GithubUtils'; | ||
|
||
type Comment = {body: string}; | ||
type Comments = { |
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.
In our guidelines we have a rule to not name types in plural form. please change it
@@ -21,10 +28,12 @@ const mockSetOutput = jest.fn(); | |||
const mockGetIssue = jest.fn(); | |||
const mockListComments = jest.fn(); | |||
|
|||
const asMutable = <T>(value: T): Writable<T> => value as Writable<T>; |
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.
Maybe it would be good to export this type to a file since we have been using in other tests, you can create a AsMutable.ts
file under src/types/utils/
, wdyt?
src/types/utils/AsMutable.ts
Outdated
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'm sorry, but could we rename it to asMutable.ts
?
src/types/utils/asMutable.ts
Outdated
@@ -0,0 +1,5 @@ | |||
import type {Writable} from 'type-fest'; | |||
|
|||
const asMutable = <T>(value: T): Writable<T> => value as Writable<T>; |
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.
It's on main already, so let's merge the newest main
@paultsimura Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
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 C+ review here as it's a test file.
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25298 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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 overall, some minor stylistic requests 🙇
type Comment = { | ||
data?: CommentData[]; | ||
}; |
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.
Would be good to have stylistic consistency and keep this all on the same line like we do for CommentData
and PullRequest
@@ -35,10 +42,12 @@ beforeAll(() => { | |||
}, | |||
}, | |||
}; | |||
|
|||
// @ts-expect-error TODO: Remove this once GithubUtils (https://github.com/Expensify/App/issues/25382) is migrated to TypeScript. |
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.
Could you please add a comment in that issue noting that this will need to be updated once it's been migrated?
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.
There is always a clean up issue at the end with the intention of going through all this TODOs and remove them.
${ | ||
!_.isEmpty(deployBlockerList) | ||
!deployBlockerList || deployBlockerList.length < 0 | ||
? ` | ||
|
||
**Deploy Blockers:**` | ||
: '' | ||
} |
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.
NAB: Since you didn't introduce this code but there's some stray whitespace here
} | |
} |
.map( | ||
({url, isQASuccess}) => ` |
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.
NAB: These can be combined into a single line. Same for lines 106 and 107
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.
Prettier is automatically moving this to a new line. Can't really change this.
@ruben-rebelo bump |
@NikkiWines I've updated the PR with your suggestions. Thank you for your review! |
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.
🚀 Deployed to staging by https://github.com/NikkiWines in version: 1.4.52-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.52-6 🚀
|
Details
[TS migration] Migrate *checkDeployBlockersTest to TypeScript
Fixed Issues
$ #25298
PROPOSAL: N/A
Tests
Verify that no errors appear in the JS console
Run checkDeployBlockersTest unit test should run successfully
Offline tests
N/A
QA Steps
Same as in the Tests section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
N/a
Android: mWeb Chrome
N/a
iOS: Native
N/a
iOS: mWeb Safari
N/a
MacOS: Chrome / Safari
N/a
MacOS: Desktop
N/a