/* bender-tags: editor,unit */ /* bender-ckeditor-plugins: divarea */ ( function() { 'use strict'; bender.test( { // (#2257) 'test destroy editor on instance created': function() { var editor = CKEDITOR.replace( 'destroyed' ), wysiwygModeSpy; editor.on( 'destroy', function() { resume( function() { assert.isFalse( wysiwygModeSpy.threw(), 'WYSIWYG mode function should not throw an exception' ); } ); } ); editor.on( 'beforeSetMode', function() { wysiwygModeSpy = sinon.spy( editor._.modes, 'wysiwyg' ); editor.destroy(); } ); wait(); } } ); } )();