Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #91 from ckeditor/i/6091
Browse files Browse the repository at this point in the history
Internal: Adjusted the code to changes required for replacing the `StylesProcessor` singleton with an instance of the class. See ckeditor/ckeditor5#6091.
  • Loading branch information
Reinmar committed Mar 3, 2020
2 parents dd41b3e + 82500bd commit 9a514cc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/mention.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import MentionEditing from '../src/mentionediting';
import MentionUI from '../src/mentionui';

describe( 'Mention', () => {
let editorElement, editor;
let editorElement, editor, viewDocument;

beforeEach( () => {
editorElement = global.document.createElement( 'div' );
Expand All @@ -25,6 +25,7 @@ describe( 'Mention', () => {
} )
.then( newEditor => {
editor = newEditor;
viewDocument = editor.editing.view.document;
} );
} );

Expand Down Expand Up @@ -52,9 +53,9 @@ describe( 'Mention', () => {

describe( 'toMentionAttribute()', () => {
it( 'should create mention attribute with default properties', () => {
const text = new Text( 'John Doe' );
const text = new Text( viewDocument, 'John Doe' );

const viewElement = new Element( 'span', {
const viewElement = new Element( viewDocument, 'span', {
'data-mention': '@John'
}, text );

Expand All @@ -66,9 +67,9 @@ describe( 'Mention', () => {
} );

it( 'should create mention attribute with provided attributes', () => {
const text = new Text( 'John Doe' );
const text = new Text( viewDocument, 'John Doe' );

const viewElement = new Element( 'span', {
const viewElement = new Element( viewDocument, 'span', {
'data-mention': '@John'
}, text );

Expand All @@ -81,7 +82,7 @@ describe( 'Mention', () => {
} );

it( 'should return undefined if Element has no text node', () => {
const viewElement = new Element( 'span', {
const viewElement = new Element( viewDocument, 'span', {
'data-mention': '@John'
} );

Expand Down

0 comments on commit 9a514cc

Please sign in to comment.