Browse Source

Added a test to ensure that spy.called is not true after spy creation.

fredck 11 years ago
parent
commit
d41821cd25
1 changed files with 8 additions and 0 deletions
  1. 8 0
      packages/ckeditor5-engine/tests/utils/utils.js

+ 8 - 0
packages/ckeditor5-engine/tests/utils/utils.js

@@ -40,6 +40,14 @@ describe( 'extend()', function() {
 } );
 } );
 
 
 describe( 'spy', function() {
 describe( 'spy', function() {
+	it( 'should not have `called` after creation', function() {
+		var utils = modules.utils;
+
+		var spy = utils.spy();
+
+		expect( spy.called ).to.not.be.true();
+	} );
+
 	it( 'should register calls', function() {
 	it( 'should register calls', function() {
 		var utils = modules.utils;
 		var utils = modules.utils;