zotero/test/tests/zoteroTest.js

20 lines
545 B
JavaScript
Raw Normal View History

"use strict";
describe("Zotero", function() {
describe("#getString()", function () {
it("should return the right plural form", function* () {
if (Zotero.locale != 'en-US') {
this.skip();
}
Components.utils.import("resource://gre/modules/PluralForm.jsm");
2016-12-11 07:55:47 +00:00
var str1 = Zotero.getString('fileInterface.itemsWereImported')
.split(/;/)[1]
.replace('%1$S', 2);
2016-12-11 07:55:47 +00:00
var str2 = Zotero.getString('fileInterface.itemsWereImported', 2, 2);
Zotero.debug(str1);
Zotero.debug(str2);
assert.equal(str1, str2);
});
});
});