forked from jpuri/react-draft-wysiwyg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
/* @flow */ | ||
|
||
import React from 'react'; | ||
import { expect, assert } from 'chai'; | ||
import { shallow } from 'enzyme'; | ||
import Editor from '..'; | ||
import React from "react"; | ||
import { expect, assert } from "chai"; | ||
import { shallow } from "enzyme"; | ||
import Editor from ".."; | ||
|
||
describe('Editor test suite', () => { | ||
it('should have a div when rendered', () => { | ||
expect(shallow(<Editor />).childAt(0).type()).to.equal('div'); | ||
describe("Editor test suite", () => { | ||
it("should have a div when rendered", () => { | ||
expect( | ||
shallow(<Editor />) | ||
.childAt(0) | ||
.type() | ||
).to.equal("div"); | ||
}); | ||
|
||
it('should have an editorState object in state', () => { | ||
xit("should have an editorState object in state", () => { | ||
const editor = shallow(<Editor />); | ||
assert.isDefined(editor.state().editorState); | ||
assert.isDefined(editor.state().editorFocused); | ||
}); | ||
|
||
it('should have toolbarHidden as false by default', () => { | ||
it("should have toolbarHidden as false by default", () => { | ||
const editor = shallow(<Editor />); | ||
expect(editor.find('.rdw-editor-toolbar')).to.have.length(1); | ||
expect(editor.find(".rdw-editor-toolbar")).to.have.length(1); | ||
}); | ||
}); |