application/__tests__/components/common/simple-editor.js
jest.unmock('./../../../components/common/simple-editor');
jest.unmock('./../../../services/base-service');
jest.unmock('./../../../services/error-service');
jest.unmock('./../../../components/common/simple-editor/service');
jest.unmock('./../../../components/common/simple-editor/inline-style-controls');
jest.unmock('./../../../components/common/simple-editor/block-style-controls');
jest.unmock('./../../../components/common/simple-editor/format-style-controls');
jest.unmock('./../../../alt');
jest.unmock('draft-js');
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 SimpleEditor from './../../../components/common/simple-editor';
// We're only testing additional functionality and some of the basic
// properties built in. The assumption being that Draft is an external
// lib and is already tested
describe('SimpleEditor component', () => {
beforeEach(() => {
jasmine.clock().uninstall();
});
it('loads default state', () => {
const editor = TestUtils.renderIntoDocument(
<SimpleEditor
label="Test"
name="test"
readOnly={false}
version={1}
defaultValue='test'
onChange={() => {}}
/>
);
expect(editor);
});
});