User:Evad37/Covery/sandbox.js: Difference between revisions

Content deleted Content added
.
.
Line 1,534:
var infobox1 = getInfoboxTemplate('{{Infobox Video Game\n| image = \n| developer = NotTheDev\n}}');
var wikitext1 = makeInfoboxWikitext(infobox1, newParams);
var expected1 = '{{Infobox Video Game\n|developer=DEV\n| image = Foo.png\n| developer = [[DEV]]\n}}';
var infobox2 = getInfoboxTemplate('{{Infobox Video Game\n| image = \n| publisher = PUB\n| developer = NotTheDev\n}}');
var wikitext2 = makeInfoboxWikitext(infobox2, newParams);
var expected2 = '{{Infobox Video Game\n|developer=DEV\n| image = Foo.png\n| publisher = PUB\n| developer = [[DEV]]\n}}';
assert.equal(wikitext1, expected1, 'No other params');
assert.equal(wikitext2, expected2, 'With one other param');