From ce5328cbc4f918e2f0062b31cbe39ee0ad82a1ff Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 20 Nov 2016 02:46:04 -0500 Subject: [PATCH] Don't trigger translator loading in download-on-demand test This was causing later tests to time out. --- test/tests/zoteroPaneTest.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/tests/zoteroPaneTest.js b/test/tests/zoteroPaneTest.js index 7ed98c4be4..142beeeaae 100644 --- a/test/tests/zoteroPaneTest.js +++ b/test/tests/zoteroPaneTest.js @@ -221,8 +221,15 @@ describe("ZoteroPane", function() { } ); + // Disable loadURI() so viewAttachment() doesn't trigger translator loading + var stub = sinon.stub(zp, "loadURI"); + yield zp.viewAttachment(item.id); + assert.ok(stub.calledOnce); + assert.ok(stub.calledWith(OS.Path.toFileURI(item.getFilePath()))); + stub.restore(); + assert.equal((yield item.attachmentHash), md5); assert.equal((yield item.attachmentModificationTime), mtime); var path = yield item.getFilePathAsync();