Skip to content
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

test: Remove mockDate and fix unit tests #32947

Merged
merged 2 commits into from
Jul 31, 2024
Merged

test: Remove mockDate and fix unit tests #32947

merged 2 commits into from
Jul 31, 2024

Conversation

gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Jul 31, 2024

Proposed changes (including videos or screenshots)

The mock date helper was made to set jest system time to June 1st. The issue is that today is July 31st, and the date object's month was being set before the day. June doesn't have a 31st day, so the date skipped to the next month, hence the CI breaking.

Issue(s)

Steps to test or reproduce

Further comments

Copy link
Contributor

dionisio-bot bot commented Jul 31, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Jul 31, 2024

⚠️ No Changeset found

Latest commit: 535d90a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.96%. Comparing base (71af514) to head (535d90a).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #32947   +/-   ##
========================================
  Coverage    54.96%   54.96%           
========================================
  Files         2595     2595           
  Lines        55993    55993           
  Branches     11593    11593           
========================================
  Hits         30779    30779           
  Misses       22569    22569           
  Partials      2645     2645           
Flag Coverage Δ
unit 72.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@gabriellsh gabriellsh requested a review from a team as a code owner July 31, 2024 13:04
@gabriellsh gabriellsh changed the title test: Fix mockDate test: Remove mockDate and fix unit tests Jul 31, 2024
@ggazzo ggazzo added this to the 6.12 milestone Jul 31, 2024
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Jul 31, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 31, 2024
@kodiakhq kodiakhq bot merged commit 8fb9ef0 into develop Jul 31, 2024
53 checks passed
@kodiakhq kodiakhq bot deleted the fix/mockDate branch July 31, 2024 14:54
@sampaiodiego
Copy link
Member

/patch

Copy link
Contributor

dionisio-bot bot commented Jul 31, 2024

Pull request #32949 added to Project: "Patch 6.10.2"

sampaiodiego pushed a commit that referenced this pull request Jul 31, 2024
Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>
gabriellsh added a commit that referenced this pull request Aug 5, 2024
…ove/threadMetrics

* 'develop' of github.com:RocketChat/Rocket.Chat: (22 commits)
  chore: saveAnalyticsData with accumulator (#32961)
  regression: fix dispatchInquiryPosition not being fired on room creation (#32972)
  chore: create `orm` for specific cases (#32948)
  chore: create `afterOmnichannelSaveMessage` (#32970)
  fix: `Menu` onPointerUp event behavior (#32968)
  Release 6.11.0-rc.2
  feat: add `Advanced settings` on create Team and Channel (#32867)
  Revert "fix: Login services button colors" (#32955)
  chore: Use index on `unlockAll` query called when changing OM routing methods (#32860)
  chore: Exclude Storybook stories from the build of `@rocket.chat/ui-composer` (#32944)
  chore: Remove `ui-kit` from `yarn fuselage` script (#32942)
  Release 6.10.2
  fix: Client crashing on firefox private window (#32950)
  fix: Apps-Engine patch (#32935)
  test: Remove mockDate and fix unit tests (#32947) (#32949)
  fix: validate `bhType` before registering it (#32931)
  test: Remove mockDate and fix unit tests (#32947)
  Bump 6.10.2
  Release 6.11.0-rc.1
  regression: notify user properly on logout (#32920)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants