Don't trigger translator loading in download-on-demand test
This was causing later tests to time out.
This commit is contained in:
parent
6c6a775be2
commit
ce5328cbc4
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
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.attachmentHash), md5);
|
||||||
assert.equal((yield item.attachmentModificationTime), mtime);
|
assert.equal((yield item.attachmentModificationTime), mtime);
|
||||||
var path = yield item.getFilePathAsync();
|
var path = yield item.getFilePathAsync();
|
||||||
|
|
Loading…
Reference in a new issue