mediawiki-extensions-Cite/tests/qunit/ve-cite/ve.ui.MWReferenceResultWidget.test.js
WMDE-Fisch 73917d493b [refactor] Move result items rendering to ReferenceResultWidget
The exact rendering of each item should be part of the widget.
This also allows a better application of the sub-ref indent.

Bug: T375841
Change-Id: Ic2c24f40d59f41b316c6d6f362726c1ee68f2102
2024-09-29 20:06:02 +02:00

23 lines
552 B
JavaScript

'use strict';
( function () {
QUnit.module( 've.ui.MWReferenceResultWidget (Cite)', ve.test.utils.newMwEnvironment() );
function getConfigMock() {
return {
item: {
$refContent: '',
reference: {},
footnoteLabel: '',
name: ''
}
};
}
QUnit.test( 'Initialization', ( assert ) => {
const widget = new ve.ui.MWReferenceResultWidget( getConfigMock() );
assert.true( widget instanceof OO.ui.OptionWidget );
assert.strictEqual( widget.$element.children( '.ve-ui-mwReferenceResultWidget-shield' ).length, 0 );
} );
}() );