diff --git a/test/tests/utilitiesTest.js b/test/tests/utilitiesTest.js index d0e62605f..a12f665b4 100644 --- a/test/tests/utilitiesTest.js +++ b/test/tests/utilitiesTest.js @@ -37,11 +37,16 @@ describe("Zotero.Utilities", function() { describe("#cleanDOI()", function () { var cleanDOI = Zotero.Utilities.cleanDOI; var doi = '10.1088/1748-9326/11/4/048002'; + var shortDOI = '10/aabbe'; it("should parse a DOI", function () { assert.equal(cleanDOI(`${doi}`), doi); }); + it("should parse a short DOI", function () { + assert.equal(cleanDOI(`${shortDOI}`), shortDOI); + }); + it("should parse a DOI at the end of a sentence", function () { assert.equal(cleanDOI(`Foo bar ${doi}. Foo bar`), doi); });