Rob Fellows created NIFI-14241:
----------------------------------
Summary: Replace deprecated imports of setup-jest with new approach
Key: NIFI-14241
URL: https://issues.apache.org/jira/browse/NIFI-14241
Project: Apache NiFi
Issue Type: Sub-task
Components: Core UI
Reporter: Rob Fellows
Assignee: Rob Fellows
When running unit tests we now see console warnings about importing of
setup-jest being deprecated
{code:java}
console.warn
Importing "setup-jest.js" directly is deprecated. The file
"setup-jest.js" will be removed in the future.
Please use "setupZoneTestEnv" function instead. Example:
// setup-jest.ts
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
setupZoneTestEnv();
11 | }
12 | };
> 13 | import 'jest-preset-angular/setup-jest';
| ^
14 |
15 | //
<https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom>
16 | Object.defineProperty(window, 'matchMedia', {
at Object.<anonymous>
(../../node_modules/jest-preset-angular/setup-jest.js:1:111)
at Object.<anonymous> (src/test-setup.ts:13:1) {code}
{{{}{}}}These warnings should be resolved before this is removed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)