Update strings and add test for ADS Bibcode extraction (#2128)

This commit is contained in:
Abe Jellinek 2021-08-04 17:37:49 -06:00 committed by GitHub
parent 4475e86eac
commit 4ebed5dee7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -382,6 +382,15 @@ describe("Zotero.Utilities.Internal", function () {
assert.propertyVal(identifiers[2], "arXiv", "hep-ex/9809001");
assert.propertyVal(identifiers[3], "arXiv", "math.GT/0309135");
});
it("should extract ADS bibcodes", async function () {
var identifiers = ZUI.extractIdentifiers("9 2021wfc..rept....8D, 2022MSSP..16208010Y.");
assert.lengthOf(identifiers, 2);
assert.lengthOf(Object.keys(identifiers[0]), 1);
assert.lengthOf(Object.keys(identifiers[1]), 1);
assert.propertyVal(identifiers[0], "adsBibcode", "2021wfc..rept....8D");
assert.propertyVal(identifiers[1], "adsBibcode", "2022MSSP..16208010Y");
});
});
describe("#resolveLocale()", function () {