Selaa lähdekoodia

Added basic tests for Plugin.

fredck 10 vuotta sitten
vanhempi
commit
9fd4567efc
1 muutettua tiedostoa jossa 27 lisäystä ja 0 poistoa
  1. 27 0
      packages/ckeditor5-utils/tests/plugin/plugin.js

+ 27 - 0
packages/ckeditor5-utils/tests/plugin/plugin.js

@@ -0,0 +1,27 @@
+/**
+ * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* globals describe, it, expect, before, document */
+
+'use strict';
+
+var modules = bender.amd.require( 'plugin', 'editor' );
+var editor;
+
+before( function() {
+	var Editor = modules.editor;
+
+	editor = new Editor( document.body.appendChild( document.createElement( 'div' ) ) );
+} );
+
+describe( 'constructor', function() {
+	it( 'should set the `editor` property', function() {
+		var Plugin = modules.plugin;
+
+		var plugin = new Plugin( editor );
+
+		expect( plugin ).to.have.property( 'editor' ).to.equal( editor );
+	} );
+} );