diff --git a/src/__mocks__/@fortawesome/react-fontawesome.js b/src/__mocks__/@fortawesome/react-fontawesome.js new file mode 100644 index 0000000..827c6aa --- /dev/null +++ b/src/__mocks__/@fortawesome/react-fontawesome.js @@ -0,0 +1,5 @@ +import React from 'react'; + +export function FontAwesomeIcon(props) { + return ; +} diff --git a/src/components/Share/Share.js b/src/components/Share/Share.js index 2f7aa97..74c4f9e 100644 --- a/src/components/Share/Share.js +++ b/src/components/Share/Share.js @@ -18,7 +18,7 @@ function Share(props) { return ( <> - + ); diff --git a/src/components/Share/__test__/Share.test.js b/src/components/Share/__test__/Share.test.js index 7cdc08f..58315fb 100644 --- a/src/components/Share/__test__/Share.test.js +++ b/src/components/Share/__test__/Share.test.js @@ -1,12 +1,12 @@ import Share from '../Share'; import React from 'react'; -import ReactDOM from 'react-dom'; import renderer from 'react-test-renderer'; +import { render } from 'react-dom'; describe('', () => { test('renders without exploding', () => { const div = document.createElement('div'); - ReactDOM.render(, div); + render(, div); }); test(' snapshot', () => { const tree = renderer.create().toJSON(); diff --git a/src/components/Share/__test__/__snapshots__/Share.test.js.snap b/src/components/Share/__test__/__snapshots__/Share.test.js.snap index 61532d2..f5de2a8 100644 --- a/src/components/Share/__test__/__snapshots__/Share.test.js.snap +++ b/src/components/Share/__test__/__snapshots__/Share.test.js.snap @@ -5,5 +5,9 @@ exports[` snapshot 1`] = ` className="button" onClick={[Function]} rel="noopener noreferrer" -/> +> + + `;