Skip to content

Commit f3aeac4

Browse files
committed
snapshot test fixed and added
1 parent 75ee515 commit f3aeac4

File tree

6 files changed

+21
-29
lines changed

6 files changed

+21
-29
lines changed

src/__tests__/__snapshots__/app.spec.js.snap

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/__tests__/app.spec.js

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`should take a snapshot 1`] = `
4+
<DocumentFragment>
5+
<button
6+
class="bg-transparent hover:bg-blue-500 text-indigo-100 font-semibold hover:text-white py-2 px-4 border border-indigo-100 hover:border-transparent rounded"
7+
type="button"
8+
>
9+
test button
10+
</button>
11+
</DocumentFragment>
12+
`;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import { render } from 'test-utils';
3+
import Button from 'uielements/button/button.component.jsx';
4+
5+
it('should take a snapshot', () => {
6+
const { asFragment } = render(<Button buttonText="test button" />)
7+
8+
expect(asFragment(<Button buttonText="test button" />)).toMatchSnapshot()
9+
});

0 commit comments

Comments
 (0)