Browse Source

Changed regexps to strings when matching whole string in to.throw() test.

Szymon Kupś 9 years ago
parent
commit
63a017800d

+ 2 - 2
packages/ckeditor5-engine/tests/_utils-tests/model.js

@@ -51,7 +51,7 @@ describe( 'model test utils', () => {
 		it( 'should throw an error when passing invalid document', () => {
 			expect( () => {
 				getData( { invalid: 'document' } );
-			} ).to.throw( TypeError, /Document needs to be an instance of engine\.model\.Document\./ );
+			} ).to.throw( TypeError, 'Document needs to be an instance of engine.model.Document.' );
 		} );
 	} );
 
@@ -85,7 +85,7 @@ describe( 'model test utils', () => {
 		it( 'should throw an error when passing invalid document', () => {
 			expect( () => {
 				setData( { invalid: 'document' } );
-			} ).to.throw( TypeError, /Document needs to be an instance of engine\.model\.Document\./ );
+			} ).to.throw( TypeError, 'Document needs to be an instance of engine.model.Document.' );
 		} );
 	} );
 

+ 2 - 2
packages/ckeditor5-engine/tests/_utils-tests/view.js

@@ -72,7 +72,7 @@ describe( 'view test utils', () => {
 			it( 'should throw an error when passing invalid document', () => {
 				expect( () => {
 					getData( { invalid: 'document' } );
-				} ).to.throw( TypeError, /Document needs to be an instance of engine\.view\.Document\./ );
+				} ).to.throw( TypeError, 'Document needs to be an instance of engine.view.Document.' );
 			} );
 		} );
 
@@ -111,7 +111,7 @@ describe( 'view test utils', () => {
 			it( 'should throw an error when passing invalid document', () => {
 				expect( () => {
 					setData( { invalid: 'document' } );
-				} ).to.throw( TypeError, /Document needs to be an instance of engine\.view\.Document\./ );
+				} ).to.throw( TypeError, 'Document needs to be an instance of engine.view.Document.' );
 			} );
 		} );
 	} );