flow-types from react object

This won’t work;

import React, { ReactNode } from 'react';

This will;

import React from 'react';
import type { Node } from 'react';

enzyme render

Difference between Shallow, Mount and render of Enzyme

wrap updates in act

To prepare a component for assertions, wrap the code rendering it and performing updates inside an act() call. This makes your test run closer to how React works in the browser.

cannot find module @babel/runtime