|
@@ -102,21 +102,21 @@ describe( 'position', () => {
|
|
|
it( 'should throw error if given path is incorrect', () => {
|
|
it( 'should throw error if given path is incorrect', () => {
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
new Position( root, {} );
|
|
new Position( root, {} );
|
|
|
- } ).to.throw( CKEditorError, /position-path-incorrect/ );
|
|
|
|
|
|
|
+ } ).to.throw( CKEditorError, /model-position-path-incorrect/ );
|
|
|
|
|
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
new Position( root, [] );
|
|
new Position( root, [] );
|
|
|
- } ).to.throw( CKEditorError, /position-path-incorrect/ );
|
|
|
|
|
|
|
+ } ).to.throw( CKEditorError, /model-position-path-incorrect/ );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should throw error if given root is invalid', () => {
|
|
it( 'should throw error if given root is invalid', () => {
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
new Position( new Text( 'a' ) );
|
|
new Position( new Text( 'a' ) );
|
|
|
- } ).to.throw( CKEditorError, /position-root-invalid/ );
|
|
|
|
|
|
|
+ } ).to.throw( CKEditorError, /model-position-root-invalid/ );
|
|
|
|
|
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
new Position();
|
|
new Position();
|
|
|
- } ).to.throw( CKEditorError, /position-root-invalid/ );
|
|
|
|
|
|
|
+ } ).to.throw( CKEditorError, /model-position-root-invalid/ );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
@@ -141,7 +141,7 @@ describe( 'position', () => {
|
|
|
it( 'throws when parent is not an element', () => {
|
|
it( 'throws when parent is not an element', () => {
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
Position.createFromParentAndOffset( b, 0 );
|
|
Position.createFromParentAndOffset( b, 0 );
|
|
|
- } ).to.throw( CKEditorError, /^position-parent-incorrect/ );
|
|
|
|
|
|
|
+ } ).to.throw( CKEditorError, /^model-position-parent-incorrect/ );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'works with a doc frag', () => {
|
|
it( 'works with a doc frag', () => {
|
|
@@ -201,7 +201,7 @@ describe( 'position', () => {
|
|
|
it( 'should throw error if one try to create positions before root', () => {
|
|
it( 'should throw error if one try to create positions before root', () => {
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
Position.createBefore( root );
|
|
Position.createBefore( root );
|
|
|
- } ).to.throw( CKEditorError, /position-before-root/ );
|
|
|
|
|
|
|
+ } ).to.throw( CKEditorError, /model-position-before-root/ );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
@@ -227,7 +227,7 @@ describe( 'position', () => {
|
|
|
it( 'should throw error if one try to make positions after root', () => {
|
|
it( 'should throw error if one try to make positions after root', () => {
|
|
|
expect( () => {
|
|
expect( () => {
|
|
|
Position.createAfter( root );
|
|
Position.createAfter( root );
|
|
|
- } ).to.throw( CKEditorError, /position-after-root/ );
|
|
|
|
|
|
|
+ } ).to.throw( CKEditorError, /model-position-after-root/ );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
@@ -763,7 +763,7 @@ describe( 'position', () => {
|
|
|
() => {
|
|
() => {
|
|
|
Position.fromJSON( { root: 'noroot', path: [ 0 ] }, doc );
|
|
Position.fromJSON( { root: 'noroot', path: [ 0 ] }, doc );
|
|
|
}
|
|
}
|
|
|
- ).to.throw( CKEditorError, /position-fromjson-no-root/ );
|
|
|
|
|
|
|
+ ).to.throw( CKEditorError, /model-position-fromjson-no-root/ );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|