2020-08-16 00:27:22 +03:00
|
|
|
import React from 'react';
|
2020-08-24 07:37:43 +03:00
|
|
|
import { createRenderer } from 'react-test-renderer/shallow';
|
2020-08-16 00:27:22 +03:00
|
|
|
import Dock from '../src/Dock';
|
|
|
|
|
|
|
|
describe('Dock component', function () {
|
|
|
|
it('should have shallow rendering', function () {
|
2020-08-24 07:37:43 +03:00
|
|
|
const renderer = createRenderer();
|
2020-08-16 00:27:22 +03:00
|
|
|
const DockEl = <Dock />;
|
2020-08-24 07:37:43 +03:00
|
|
|
renderer.render(DockEl);
|
2020-08-16 00:27:22 +03:00
|
|
|
|
2020-08-24 07:37:43 +03:00
|
|
|
const result = renderer.getRenderOutput();
|
2020-08-16 00:27:22 +03:00
|
|
|
|
|
|
|
expect(DockEl.props).toEqual({
|
|
|
|
position: 'left',
|
|
|
|
zIndex: 99999999,
|
|
|
|
fluid: true,
|
|
|
|
defaultSize: 0.3,
|
|
|
|
dimMode: 'opaque',
|
|
|
|
duration: 200,
|
|
|
|
});
|
|
|
|
expect(result.type).toBe('div');
|
|
|
|
});
|
|
|
|
});
|