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
Fix broken webapp unit tests #4951
base: main
Are you sure you want to change the base?
Fix broken webapp unit tests #4951
Conversation
Hello @Dripcoding, Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here. |
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.
When was this broken ?
This comment was marked as resolved.
This comment was marked as resolved.
I opened an issue because I saw failing tests when I checked out the main branch. |
|
||
const card1 = TestBlockFactory.createCard(board) |
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 function relies on Date.now() to populate the createAt
and updatedAt
fields when a block is not provided. I created a new function createCardWithBlock
and passed it a block stub to make it clearer how card fields are populated for this test suite.
Oh yeah sorry i mis saw this being opened in the monorepo |
@M-ZubairAhmed I figured out why the tests were failing in the pipeline. Turns out I had a different version of node running locally :] Pushed the fixes and saw the tests passing when I re-triggered the actions in my forked repo. |
@@ -30,6 +30,7 @@ jobs: | |||
uses: actions/checkout@v3 | |||
with: | |||
path: "focalboard" | |||
ref: ${{ env.BRANCH_NAME }} |
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 ensures that the feature branch is checked out when the workflows run
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
Summary
Fix broken jest unit tests for the web app. Run 'npm run test' to run all tests.
Ticket Link
N/A
Fixes #4944