Tests for Pin rendering component
This commit is contained in:
parent
ee915c39dc
commit
47ee62d387
25
src/rendering/Pin/__snapshots__/test.js.snap
Normal file
25
src/rendering/Pin/__snapshots__/test.js.snap
Normal file
@ -0,0 +1,25 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Pin layout 1`] = `
|
||||
Object {
|
||||
"box": Object {
|
||||
"height": 10,
|
||||
"width": 10,
|
||||
},
|
||||
"type": "Pin",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`Pin rendering 1`] = `
|
||||
<circle
|
||||
r={5}
|
||||
style={
|
||||
Object {
|
||||
"fill": "#6b6659",
|
||||
"stroke": "#000",
|
||||
"strokeWidth": "2px",
|
||||
}
|
||||
}
|
||||
transform="translate(5 5)"
|
||||
/>
|
||||
`;
|
20
src/rendering/Pin/test.js
Normal file
20
src/rendering/Pin/test.js
Normal file
@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import Pin, { layout } from 'rendering/Pin';
|
||||
|
||||
describe('Pin', () => {
|
||||
test('rendering', () => {
|
||||
const component = shallow(
|
||||
<Pin/>
|
||||
);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('layout', () => {
|
||||
const processed = layout({
|
||||
type: 'Pin'
|
||||
});
|
||||
expect(processed).toMatchSnapshot();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user