|
@@ -332,7 +332,7 @@ describe( 'Model', () => {
|
|
|
model.change( () => {
|
|
model.change( () => {
|
|
|
throw error;
|
|
throw error;
|
|
|
} );
|
|
} );
|
|
|
- }, /model-change-unexpected-error/, model, {
|
|
|
|
|
|
|
+ }, /unexpected-error/, model, {
|
|
|
originalError: {
|
|
originalError: {
|
|
|
message: 'foo',
|
|
message: 'foo',
|
|
|
stack: 'bar',
|
|
stack: 'bar',
|
|
@@ -342,11 +342,9 @@ describe( 'Model', () => {
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should throw the original CKEditorError error if it was thrown inside the `change()` block', () => {
|
|
it( 'should throw the original CKEditorError error if it was thrown inside the `change()` block', () => {
|
|
|
- const err = new CKEditorError( 'foo', null, { foo: 1 } );
|
|
|
|
|
-
|
|
|
|
|
expectToThrowCKEditorError( () => {
|
|
expectToThrowCKEditorError( () => {
|
|
|
model.change( () => {
|
|
model.change( () => {
|
|
|
- throw err;
|
|
|
|
|
|
|
+ throw new CKEditorError( 'foo', null, { foo: 1 } );
|
|
|
} );
|
|
} );
|
|
|
}, /foo/, null, { foo: 1 } );
|
|
}, /foo/, null, { foo: 1 } );
|
|
|
} );
|
|
} );
|
|
@@ -359,7 +357,7 @@ describe( 'Model', () => {
|
|
|
model.enqueueChange( () => {
|
|
model.enqueueChange( () => {
|
|
|
throw error;
|
|
throw error;
|
|
|
} );
|
|
} );
|
|
|
- }, /model-enqueueChange-unexpected-error/, model, {
|
|
|
|
|
|
|
+ }, /unexpected-error/, model, {
|
|
|
originalError: {
|
|
originalError: {
|
|
|
message: 'foo',
|
|
message: 'foo',
|
|
|
stack: 'bar',
|
|
stack: 'bar',
|