Explorar el Código

Tests: fixed tests for core.Command.

Szymon Cofalik hace 9 años
padre
commit
8d095d9591
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      packages/ckeditor5-engine/tests/command.js

+ 7 - 2
packages/ckeditor5-engine/tests/command.js

@@ -38,11 +38,16 @@ describe( 'constructor', () => {
 
 	it( 'Command should have execute method', () => {
 		expect( command ).to.have.property( 'execute' );
-		expect( typeof command.execute ).to.equal( 'function' );
+
+		expect( () => {
+			command.execute();
+		} ).not.to.throw;
 	} );
 
 	it( 'should add listener to its checkEnabled event if checkSchema method is present', () => {
-		sinon.spy( command, 'checkSchema' );
+		expect( command.checkSchema ).to.be.undefined;
+
+		command.checkSchema = sinon.spy();
 		command.checkEnabled();
 
 		expect( command.checkSchema.called ).to.be.false;