Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
Add React Testing Library (#4221)
Browse files Browse the repository at this point in the history
  • Loading branch information
psealock authored Apr 27, 2020
1 parent 717be1a commit a976608
Show file tree
Hide file tree
Showing 3 changed files with 284 additions and 1 deletion.
15 changes: 15 additions & 0 deletions client/homepage/test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { render } from '@testing-library/react';
import Homepage from '../index';

describe( 'homepage', () => {
it( 'should render', () => {
const { container } = render( <Homepage /> );
expect( container ).toMatchInlineSnapshot( `
<div>
<div>
Hello World
</div>
</div>
` );
} );
} );
269 changes: 268 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
"@storybook/addon-viewport": "5.3.18",
"@storybook/addons": "5.3.18",
"@storybook/react": "5.3.18",
"@testing-library/react": "^10.0.3",
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
"@wordpress/babel-plugin-makepot": "2.1.3",
"@wordpress/babel-preset-default": "3.0.2",
Expand Down

0 comments on commit a976608

Please sign in to comment.