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

[tests-only] use jest.mocked instead of mocked from ts-jest/utils #6407

Conversation

individual-it
Copy link
Member

@individual-it individual-it commented Feb 10, 2022

Description

the mocked util function is now deprecated and has been moved to Jest repository, see https://github.com/facebook/jest/pull

the log output is probably there since bumping jest to 27.x 7fa3b71

alternative is to disable the warning with process.env.DISABLE_MOCKED_WARNING=true but I don't see why that should be good
@pascalwengerter (you have bumped jest) @fschade (you have written the tests) opinions?

Related Issue

Motivation and Context

get rid of this log output

 `mocked` util function is now deprecated and has been moved to Jest repository, see https://github.com/facebook/jest/pull/12089. In `ts-jest` v28.0.0, `mocked` function will be completely removed. Users are encouraged to use to Jest v27.4.0 or above to have `mocked` function available from `jest-mock`. One can disable this warning by setting environment variable process.env.DISABLE_MOCKED_WARNING=true

How Has This Been Tested?

  • running unit tests locally
  • 🤖

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@sonarcloud
Copy link

sonarcloud bot commented Feb 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@pascalwengerter pascalwengerter left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking care!

@pascalwengerter pascalwengerter merged commit f0a7a5e into master Feb 10, 2022
@delete-merged-branch delete-merged-branch bot deleted the reduceLogOutput/web-runtime/tests/unit/container/bootstrap.spec.ts branch February 10, 2022 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants