Skip to content

Commit

Permalink
fix: use enzyme 16 adapter for React 17
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Sep 22, 2020
1 parent e95605c commit d5c8aa2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testConfig/setupTests.js
Expand Up @@ -7,9 +7,11 @@ function getAdapter() {
return require('enzyme-adapter-react-15');
} else if (React.version.startsWith('16')) {
return require('enzyme-adapter-react-16');
} else if (React.version.startsWith('17')) {
return require('enzyme-adapter-react-16');
}

return null;
throw new Error('this version of React is not supported by Enzyme');
}

const Adapter = getAdapter();
Expand Down

0 comments on commit d5c8aa2

Please sign in to comment.