Updating Pin rendering to use react-testing-library

This commit is contained in:
Jeff Avallone 2019-03-24 14:55:10 -04:00
parent f63e9b2a47
commit c8068762b5
2 changed files with 15 additions and 15 deletions

View File

@ -11,15 +11,13 @@ Object {
`;
exports[`Pin rendering 1`] = `
<circle
r={5}
style={
Object {
"fill": "#6b6659",
"stroke": "#000",
"strokeWidth": "2px",
}
}
transform="translate(5 5)"
/>
<DocumentFragment>
<svg>
<circle
r="5"
style="fill: #6b6659; stroke-width: 2px; stroke: #000;"
transform="translate(5 5)"
/>
</svg>
</DocumentFragment>
`;

View File

@ -1,14 +1,16 @@
import React from 'react';
import { shallow } from 'enzyme';
import { render } from 'react-testing-library';
import Pin, { layout } from 'rendering/Pin';
describe('Pin', () => {
test('rendering', () => {
const component = shallow(
<Pin/>
const { asFragment } = render(
<svg>
<Pin/>
</svg>
);
expect(component).toMatchSnapshot();
expect(asFragment()).toMatchSnapshot();
});
test('layout', () => {