%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/wiki.varak.net/extensions/VisualEditor/lib/ve/tests/ui/
Upload File :
Create Path :
Current File : /www/varak.net/wiki.varak.net/extensions/VisualEditor/lib/ve/tests/ui/ve.ui.Trigger.test.js

/*!
 * VisualEditor UserInterface Trigger tests.
 *
 * @copyright 2011-2016 VisualEditor Team and others; see http://ve.mit-license.org
 */

QUnit.module( 've.ui.Trigger' );

/* Tests */

QUnit.test( 'constructor', function ( assert ) {
	var i, len, tests;
	function event( options ) {
		return jQuery.Event( 'keydown', options );
	}

	tests = [
		{
			trigger: 'ctrl+b',
			event: event( { ctrlKey: true, which: 66 } )
		}
	];
	QUnit.expect( 2 * tests.length );
	for ( i = 0, len = tests.length; i < len; i++ ) {
		assert.strictEqual(
			new ve.ui.Trigger( tests[ i ].trigger ).toString(),
			tests[ i ].trigger,
			'trigger is parsed correctly'
		);
		assert.strictEqual(
			new ve.ui.Trigger( tests[ i ].event ).toString(),
			tests[ i ].trigger,
			'event is parsed correctly'
		);
	}
} );

Zerion Mini Shell 1.0