Browse Source

Add tests for schema.createContext().

Maciej Gołaszewski 7 years ago
parent
commit
1085d8107e
1 changed files with 8 additions and 0 deletions
  1. 8 0
      packages/ckeditor5-engine/tests/model/schema.js

+ 8 - 0
packages/ckeditor5-engine/tests/model/schema.js

@@ -2762,6 +2762,14 @@ describe( 'Schema', () => {
 			expect( schema.isObject( 'caption' ) ).to.be.false;
 			expect( schema.isObject( 'caption' ) ).to.be.false;
 		} );
 		} );
 	} );
 	} );
+
+	describe( 'createContext()', () => {
+		it( 'should return SchemaContext instance', () => {
+			const ctx = schema.createContext( [ 'a', 'b', 'c' ] );
+
+			expect( ctx ).to.be.instanceof( SchemaContext );
+		} );
+	} );
 } );
 } );
 
 
 describe( 'SchemaContext', () => {
 describe( 'SchemaContext', () => {