mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-12-04 04:38:28 +00:00
23 lines
443 B
JavaScript
23 lines
443 B
JavaScript
|
let RelatedArticles;
|
||
|
describe( 'RelatedArticles', () => {
|
||
|
beforeEach( () => {
|
||
|
RelatedArticles = require( '../../resources/ext.relatedArticles.readMore/RelatedArticles.js' );
|
||
|
} );
|
||
|
|
||
|
it( 'renders with cards', () => {
|
||
|
const html = RelatedArticles( {
|
||
|
cards: [
|
||
|
{
|
||
|
id: '4',
|
||
|
label: 'Title',
|
||
|
value: 'Title',
|
||
|
description: 'Description'
|
||
|
}
|
||
|
]
|
||
|
} );
|
||
|
expect(
|
||
|
html
|
||
|
).toContain( 'class="cdx-card"' );
|
||
|
} );
|
||
|
} );
|