Skip to content

Commit

Permalink
Update submodules and fix tests (zotero#164)
Browse files Browse the repository at this point in the history
Update all submodules. Fix two failing
tests that are no longer compatible with the
translators submodule:

* LOC translator upstream now uses https
* Hand actual ISBN instead of var name to LoC translator
  • Loading branch information
mvolz authored Feb 26, 2024
1 parent 90d35da commit dc0be9c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/translate
2 changes: 1 addition & 1 deletion modules/translators
Submodule translators updated 126 files
2 changes: 1 addition & 1 deletion modules/zotero-schema
Submodule zotero-schema updated 1 files
+77 −80 schema.json
4 changes: 2 additions & 2 deletions test/search_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("/search", function () {
}

// Mock Library of Congress ISBN lookup
if (url.startsWith('http://lx2.loc.gov')) {
if (url.startsWith('https://lx2.loc.gov')) {
var xml = fs.readFileSync(
path.join(__dirname, 'data', 'loc_book1_response.xml'),
{
Expand Down Expand Up @@ -68,7 +68,7 @@ describe("/search", function () {
var origQueryLambda = TextSearch.queryLambda.bind(TextSearch);
sinon.stub(TextSearch, 'queryLambda').callsFake(function (query) {
if (query == bookTitle1.toLowerCase()) {
return Promise.resolve([{"ISBN":"${bookISBN1}"}]);
return Promise.resolve([{"ISBN":bookISBN1}]);
}
return origQueryLambda(query);
});
Expand Down

0 comments on commit dc0be9c

Please sign in to comment.