The user should prefer Full DOM rendering over shallow rendering components.
With shallow rendering, I can refactor my component’s implementation and my tests break. With shallow rendering, I can break my application and my tests say everything’s still working.
Kent C. Dodds
More information: Why I Never Use Shallow Rendering by Kent C. Dodds
The following patterns are considered warnings:
import { shallow } from 'enzyme';
const { shallow } = require('enzyme');
import enzyme from 'enzyme';
enzyme.shallow(<Component />);
const enzyme = require('enzyme');
enzyme.shallow(<Component />)
The following patterns are not considered warnings:
import { mount } from 'enzyme';
import enzyme from 'enzyme';
const { mount } = require('enzyme');
const enzyme = require('enzyme');