mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
5d20f45120
Change-Id: Ie5f4fd86612b5a6c34b5843d1e9a521edc626a63
28 lines
697 B
JavaScript
28 lines
697 B
JavaScript
module( 've.dm.Converter' );
|
|
|
|
/* Tests */
|
|
|
|
test( 'getDataElementFromHtmlElement', function() {
|
|
for ( var msg in ve.dm.example.conversions ) {
|
|
var conversion = ve.dm.example.conversions[msg];
|
|
deepEqual(
|
|
ve.dm.converter.getDataElementFromHtmlElement( conversion.htmlElement ),
|
|
conversion.dataElement,
|
|
msg
|
|
);
|
|
}
|
|
} );
|
|
|
|
test( 'getHtmlElementFromDataElement', function() {
|
|
for ( var msg in ve.dm.example.conversions ) {
|
|
var conversion = ve.dm.example.conversions[msg];
|
|
deepEqual(
|
|
ve.example.getHtmlElementSummary(
|
|
ve.dm.converter.getHtmlElementFromDataElement( conversion.dataElement )
|
|
),
|
|
ve.example.getHtmlElementSummary( conversion.htmlElement ),
|
|
msg
|
|
);
|
|
}
|
|
} );
|