mediawiki-extensions-Cite/tests/qunit/ve-cite/ve.ui.MWReferenceContextItem.test.js
Ed Sanders 5a2154de38 ESLint: Enforce prefer-arrow-callback
Change-Id: I8d96b69e8c15bc8ad84cfb0c511396e5b3e7ac20
2024-06-03 12:31:33 +01:00

19 lines
581 B
JavaScript

'use strict';
QUnit.module( 've.ui.MWReferenceContextItem (Cite)', ve.test.utils.newMwEnvironment() );
QUnit.test( 'getReferenceNode', ( assert ) => {
// XXX: This is a regression test with a fragile setup. Please feel free to delete this test
// when you feel like it doesn't make sense to update it.
const context = {
isMobile: () => false,
getSurface: () => ( {
isReadOnly: () => false
} )
};
const model = { isEditable: () => false };
const item = new ve.ui.MWReferenceContextItem( context, model );
assert.strictEqual( item.getReferenceNode(), null );
} );