mediawiki-extensions-Visual.../modules/ve-mw/test/dm/ve.dm.MWConverter.test.js
Ed Sanders 6d34e344ee getDataFromDom -> getModelFromDom
Following on from getDomFromModel, this returns a document model
instead of element linear data. The only instance that hasn't been
replaced is in rich paste, where we need to sanitize the converted
data before constructing the document model.

This should be cleaned up in a later commit.

Change-Id: I37a2b641632af2cb515e3409deed5cd1fa358af5
2013-12-04 14:46:34 -08:00

19 lines
540 B
JavaScript

/*!
* VisualEditor DataModel MediaWiki Converter tests.
*
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
QUnit.module( 've.dm.MWConverter' );
/* Tests */
QUnit.test( 'getModelFromDom', function ( assert ) {
ve.test.utils.runGetModelFromDomTests( assert, ve.copy( ve.dm.mwExample.domToDataCases ) );
} );
QUnit.test( 'getDomFromModel', function ( assert ) {
ve.test.utils.runGetDomFromModelTests( assert, ve.copy( ve.dm.mwExample.domToDataCases ) );
} );