do not throw warn if content is null

This commit is contained in:
Philipp Kühn
2019-02-06 10:36:50 +01:00
parent 8a23c4c945
commit 44525063bc
2 changed files with 12 additions and 0 deletions

View File

@@ -25,6 +25,14 @@ test('create editor', () => {
expect(editor).toBeDefined()
})
test('check empty content (null)', () => {
const editor = new Editor({
content: null,
})
expect(editor.getHTML()).toEqual('<p></p>')
})
test('check invalid content (JSON)', () => {
const editor = new Editor({
content: { thisIsNotAValidDocument: true },