function createStubTitle( fragment = null ) { return { getFragment() { return fragment; } }; } ( mw.loader.getModuleNames().indexOf( 'ext.popups.main' ) !== -1 ? QUnit.module : QUnit.module.skip )( 'ext.cite.referencePreviews#createReferenceGateway', { beforeEach() { this.$sourceElement = $( '' ).appendTo( $( '' ).attr( 'id', 'cite_ref-1' ).appendTo( document.body ) ); this.$references = $( '