application/__tests__/components/common/rich-editor/dropcap-test.js
jest.unmock('./../../../../components/common/rich-editor/drop-cap');
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import Immutable from 'immutable';
import sinon from 'sinon';
import AltTestingUtils from 'alt-utils/lib/AltTestingUtils';
import DropCap from './../../../../components/common/rich-editor/drop-cap';
describe('DropCapEditorComponent', () => {
let windowStub;
beforeEach(() => {
jasmine.clock().uninstall();
jasmine.clock().install();
});
afterEach(() => {
jasmine.clock().uninstall();
})
it('loads wrapped dropcap', () => {
const el = TestUtils.renderIntoDocument(<DropCap>F</DropCap>);
const span = ReactDOM.findDOMNode(el);
expect(span.textContent).toEqual('F');
expect(span.getAttribute('class')).toEqual('richEditor-dropcap');
});
});