From 2495f8c4f732c9cc07e45ae1080d2365c0e309a8 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Wed, 15 Nov 2017 18:43:23 +1300 Subject: [PATCH] test: more windows tests (#172) * test: use os.tmpdir() not '/tmp' * test: lint errors * test: timeout * fix: lint and timeout --- test/spawning-daemons.spec.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/spawning-daemons.spec.js b/test/spawning-daemons.spec.js index 80eb3986..d50f3e7f 100644 --- a/test/spawning-daemons.spec.js +++ b/test/spawning-daemons.spec.js @@ -20,9 +20,11 @@ const ipfsd = require('../src') const isWindows = os.platform() === 'win32' -describe('daemon spawning', () => { +describe('daemon spawning', function () { + this.timeout(60 * 1000) + describe('local daemon', () => { - const repoPath = '/tmp/ipfsd-ctl-test' + const repoPath = path.join(os.tmpdir(), 'ipfsd-ctl-test') const addr = '/ip4/127.0.0.1/tcp/5678' const config = { Addresses: { @@ -199,7 +201,7 @@ describe('daemon spawning', () => { }) describe('setting up and init a local node', () => { - const testpath1 = '/tmp/ipfstestpath1' + const testpath1 = path.join(os.tmpdir(), 'ipfstestpath1') describe('cleanup', () => { before((done) => { @@ -207,7 +209,7 @@ describe('daemon spawning', () => { }) it('should not have a directory', () => { - expect(fs.existsSync('/tmp/ipfstestpath1')).to.be.eql(false) + expect(fs.existsSync(testpath1)).to.be.eql(false) }) })