Improve test for event-title substitution

And add comments

Follow-up to 20d0f103f
This commit is contained in:
Dan Stillman 2022-08-10 01:33:13 -04:00
parent ebacb83563
commit c90f8415b3
2 changed files with 12 additions and 2 deletions

View file

@ -98,7 +98,9 @@ describe("Zotero.Styles", function() {
<layout>
<text variable="event"/>
<text value=" - "/>
<text variable="event event-place"/>
<text variable="event foo"/>
<text value=" - "/>
<text variable="event-place"/>
</layout>
</bibliography>
</style>
@ -113,6 +115,7 @@ describe("Zotero.Styles", function() {
}
);
item.setField('conferenceName', 'Conference');
item.setField('place', 'Place');
await item.saveTx();
});
@ -121,7 +124,7 @@ describe("Zotero.Styles", function() {
var cslEngine = style.getCiteProc('en-US', 'text');
var text = Zotero.Cite.makeFormattedBibliographyOrCitationList(cslEngine, [item], "text");
cslEngine.free();
assert.equal(text, 'Conference - Conference\n');
assert.equal(text, 'Conference - Conference - Place\n');
});
});
});