Skip to content

Commit

Permalink
test: more windows tests (#172)
Browse files Browse the repository at this point in the history
* test: use os.tmpdir() not '/tmp'

* test: lint errors

* test: timeout

* fix: lint and timeout
  • Loading branch information
richardschneider authored and daviddias committed Nov 15, 2017
1 parent 0693e8b commit 2495f8c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/spawning-daemons.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -199,15 +201,15 @@ 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) => {
rimraf(testpath1, done)
})

it('should not have a directory', () => {
expect(fs.existsSync('/tmp/ipfstestpath1')).to.be.eql(false)
expect(fs.existsSync(testpath1)).to.be.eql(false)
})
})

Expand Down

0 comments on commit 2495f8c

Please sign in to comment.