diff --git a/test/tests/zoteroPaneTest.js b/test/tests/zoteroPaneTest.js index 0bb9a34fb8..3b6ed2e21d 100644 --- a/test/tests/zoteroPaneTest.js +++ b/test/tests/zoteroPaneTest.js @@ -1434,19 +1434,21 @@ describe("ZoteroPane", function() { let dialogStub = sinon.stub(zp, 'showLinkedFileFoundAutomaticallyDialog') .returns('one'); - let existsSpy = sinon.spy(OS.File, 'exists'); + // No longer works with IOUtils + //let existsSpy = sinon.spy(IOUtils, 'exists'); await zp.checkForLinkedFilesToRelink(attachment); assert.ok(dialogStub.calledOnce); assert.ok(dialogStub.calledWith(attachment, sinon.match.string, 0)); - assert.ok(existsSpy.calledWith(OS.Path.join(labdSubdir, 'test.pdf'))); - assert.notOk(existsSpy.calledWith(OS.Path.join(labdDir, 'test.pdf'))); // Should never get there + //Zotero.debug(existsSpy.calledWith(OS.Path.join(labdSubdir, 'test.pdf'))); + //assert.ok(existsSpy.calledWith(OS.Path.join(labdSubdir, 'test.pdf'))); + //assert.notOk(existsSpy.calledWith(OS.Path.join(labdDir, 'test.pdf'))); // Should never get there await assert.eventually.isTrue(attachment.fileExists()); assert.equal(attachment.getFilePath(), labdFile); assert.equal(attachment.attachmentPath, 'attachments:subdir/test.pdf'); dialogStub.restore(); - existsSpy.restore(); + //existsSpy.restore(); }); it("should handle Windows paths", async function () {