Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 94cc93f

Browse files
author
Alan Shaw
committed
fix: reinstate exchange directory tests
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 6f4bc5a commit 94cc93f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/exchange-files.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ describe('exchange files', () => {
284284
})
285285
}))
286286

287-
if (isWindows) { return }
287+
if (isWindows()) { return }
288288
// TODO fix dir tests on Windows
289289

290290
describe('get directory', () => depth.forEach((d) => dirs.forEach((num) => {
@@ -297,10 +297,10 @@ describe('exchange files', () => {
297297
depth: d,
298298
number: num
299299
}).then(() => {
300-
return goDaemon.api.util.addFromFs(dir, { recursive: true })
300+
return goDaemon.api.addFromFs(dir, { recursive: true })
301301
}).then((res) => {
302302
const hash = res[res.length - 1].hash
303-
return jsDaemon.api.files.get(hash)
303+
return jsDaemon.api.get(hash)
304304
}).then((res) => {
305305
expect(res).to.exist()
306306
return rmDir(dir)
@@ -316,10 +316,10 @@ describe('exchange files', () => {
316316
depth: d,
317317
number: num
318318
}).then(() => {
319-
return jsDaemon.api.util.addFromFs(dir, { recursive: true })
319+
return jsDaemon.api.addFromFs(dir, { recursive: true })
320320
}).then((res) => {
321321
const hash = res[res.length - 1].hash
322-
return goDaemon.api.files.get(hash)
322+
return goDaemon.api.get(hash)
323323
}).then((res) => {
324324
expect(res).to.exist()
325325
return rmDir(dir)
@@ -335,10 +335,10 @@ describe('exchange files', () => {
335335
depth: d,
336336
number: num
337337
}).then(() => {
338-
return jsDaemon2.api.util.addFromFs(dir, { recursive: true })
338+
return jsDaemon2.api.addFromFs(dir, { recursive: true })
339339
}).then((res) => {
340340
const hash = res[res.length - 1].hash
341-
return jsDaemon.api.files.get(hash)
341+
return jsDaemon.api.get(hash)
342342
}).then((res) => {
343343
expect(res).to.exist()
344344
return rmDir(dir)
@@ -354,10 +354,10 @@ describe('exchange files', () => {
354354
depth: d,
355355
number: num
356356
}).then(() => {
357-
return goDaemon2.api.util.addFromFs(dir, { recursive: true })
357+
return goDaemon2.api.addFromFs(dir, { recursive: true })
358358
}).then((res) => {
359359
const hash = res[res.length - 1].hash
360-
return goDaemon.api.files.get(hash)
360+
return goDaemon.api.get(hash)
361361
}).then((res) => {
362362
expect(res).to.exist()
363363
return rmDir(dir)

0 commit comments

Comments
 (0)