API: shallowhelp wanted
Description
Hi, this seems like a potentially common issue but I haven't found anything directly addressing it. Enzyme seems to throw the error:
ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was symbol.
when trying to wrap React.Fragment with shallow.
Test code:
import React from 'react';
import Adapter from 'enzyme-adapter-react-16';
import { configure, shallow } from 'enzyme';
configure({ adapter: new Adapter() });
describe('test', () => {
it('case', () => {
shallow(<React.Fragment>test</React.Fragment>);
});
});
My package.json is:
{
"name": "enzyme",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"@babel/preset-env": "^7.8.4",
"@babel/preset-react": "^7.8.3",
"babel-jest": "^25.1.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"jest": "^25.1.0",
"react": "^16.12.0",
"react-test-renderer": "^16.12.0"
},
"scripts": {
"test": "jest"
},
"dependencies": {
"react-dom": "^16.12.0"
}
}