www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ce5328cbc4f918e2f0062b31cbe39ee0ad82a1ff
parent 6c6a775be2529506f157ca4eb1993f35c22a2a9a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun, 20 Nov 2016 02:46:04 -0500

Don't trigger translator loading in download-on-demand test

This was causing later tests to time out.

Diffstat:
Mtest/tests/zoteroPaneTest.js | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git 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();