Browse Source

Merge branch 't/ckeditor5/84'

Piotrek Koszuliński 9 years ago
parent
commit
c7483a2893

+ 2 - 2
packages/ckeditor5-utils/tests/ckeditorerror.js

@@ -46,11 +46,11 @@ describe( 'CKEditorError', () => {
 		let data = {
 			bar: 'a',
 			bom: new Foo(),
-			bim: document.body
+			bim: 10
 		};
 		let error = new CKEditorError( 'foo', data );
 
-		expect( error ).to.have.property( 'message', 'foo {"bar":"a","bom":{"x":1},"bim":{}}' );
+		expect( error ).to.have.property( 'message', 'foo {"bar":"a","bom":{"x":1},"bim":10}' );
 		expect( error ).to.have.property( 'data', data );
 	} );
 } );

+ 4 - 4
packages/ckeditor5-utils/tests/config.js

@@ -151,8 +151,8 @@ describe( 'set', () => {
 	it( 'should set `null` for undefined value', () => {
 		config.set( 'test' );
 
-		expect( config.test ).to.be.null();
-		expect( config.get( 'test' ) ).to.be.null();
+		expect( config.test ).to.be.null;
+		expect( config.get( 'test' ) ).to.be.null;
 	} );
 } );
 
@@ -186,11 +186,11 @@ describe( 'get', () => {
 	} );
 
 	it( 'should return undefined for non existing configuration', () => {
-		expect( config.get( 'invalid' ) ).to.be.undefined();
+		expect( config.get( 'invalid' ) ).to.be.undefined;
 	} );
 
 	it( 'should return undefined for non existing deep configuration', () => {
-		expect( config.get( 'resize.invalid.value' ) ).to.be.undefined();
+		expect( config.get( 'resize.invalid.value' ) ).to.be.undefined;
 	} );
 } );
 

+ 2 - 2
packages/ckeditor5-utils/tests/dom/createelement.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* bender-tags: dom */
+/* bender-tags: dom, browser-only */
 
 'use strict';
 
@@ -41,4 +41,4 @@ describe( 'createElement', () => {
 		expect( p.childNodes[ 0 ].data ).to.equal( 'foo' );
 		expect( p.childNodes[ 1 ].tagName.toLowerCase() ).to.equal( 'img' );
 	} );
-} );
+} );

+ 2 - 2
packages/ckeditor5-utils/tests/dom/indexof.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* bender-tags: dom */
+/* bender-tags: dom, browser-only */
 
 'use strict';
 
@@ -30,4 +30,4 @@ describe( 'indexOf', () => {
 		expect( indexOf( p1 ) ).to.equal( 1 );
 		expect( indexOf( p2 ) ).to.equal( 2 );
 	} );
-} );
+} );

+ 2 - 2
packages/ckeditor5-utils/tests/dom/insertat.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* bender-tags: dom */
+/* bender-tags: dom, browser-only */
 
 'use strict';
 
@@ -60,4 +60,4 @@ describe( 'insertAt', () => {
 		expect( div.childNodes[ 1 ] ).to.equal( p1 );
 		expect( div.childNodes[ 2 ] ).to.equal( p2 );
 	} );
-} );
+} );

+ 2 - 2
packages/ckeditor5-utils/tests/dom/remove.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-/* bender-tags: dom */
+/* bender-tags: dom, browser-only */
 
 'use strict';
 
@@ -33,4 +33,4 @@ describe( 'remove', () => {
 
 		expect( div.parentNode ).to.be.null;
 	} );
-} );
+} );

+ 6 - 6
packages/ckeditor5-utils/tests/eventinfo.js

@@ -13,8 +13,8 @@ describe( 'EventInfo', () => {
 
 		expect( event.source ).to.equal( this );
 		expect( event.name ).to.equal( 'test' );
-		expect( event.stop.called ).to.not.be.true();
-		expect( event.off.called ).to.not.be.true();
+		expect( event.stop.called ).to.not.be.true;
+		expect( event.off.called ).to.not.be.true;
 	} );
 
 	it( 'should have stop() and off() marked', () => {
@@ -23,8 +23,8 @@ describe( 'EventInfo', () => {
 		event.stop();
 		event.off();
 
-		expect( event.stop.called ).to.be.true();
-		expect( event.off.called ).to.be.true();
+		expect( event.stop.called ).to.be.true;
+		expect( event.off.called ).to.be.true;
 	} );
 
 	it( 'should not mark "called" in future instances', () => {
@@ -35,7 +35,7 @@ describe( 'EventInfo', () => {
 
 		event = new EventInfo( 'test' );
 
-		expect( event.stop.called ).to.not.be.true();
-		expect( event.off.called ).to.not.be.true();
+		expect( event.stop.called ).to.not.be.true;
+		expect( event.off.called ).to.not.be.true;
 	} );
 } );

+ 3 - 3
packages/ckeditor5-utils/tests/spy.js

@@ -12,7 +12,7 @@ describe( 'utils', () => {
 		it( 'should not have `called` after creation', () => {
 			let fn = spy();
 
-			expect( fn.called ).to.not.be.true();
+			expect( fn.called ).to.not.be.true;
 		} );
 
 		it( 'should register calls', () => {
@@ -21,8 +21,8 @@ describe( 'utils', () => {
 
 			fn1();
 
-			expect( fn1.called ).to.be.true();
-			expect( fn2.called ).to.not.be.true();
+			expect( fn1.called ).to.be.true;
+			expect( fn2.called ).to.not.be.true;
 		} );
 	} );
 } );