Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: disable Browser test on Windows
Browse files Browse the repository at this point in the history
`process.platform` is only available in Node.js and not in the Browsers.
Hence the `diag.spec.js` tests weren't correctly skipped on Windows.
  • Loading branch information
vmx committed Mar 10, 2018
1 parent 1a0d6a9 commit 385a6c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
},
"devDependencies": {
"aegir": "^13.0.6",
"browser-process-platform": "^0.1.1",
"chai": "^4.1.2",
"cross-env": "^5.1.3",
"dirty-chai": "^2.0.1",
Expand Down
4 changes: 2 additions & 2 deletions test/diag.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const chai = require('chai')
const dirtyChai = require('dirty-chai')
const expect = chai.expect
chai.use(dirtyChai)
const os = require('os')
const platform = require('browser-process-platform')

const IPFSApi = require('../src')
const f = require('./utils/factory')
Expand All @@ -14,7 +14,7 @@ describe('.diag', function () {
this.timeout(50 * 1000)

// go-ipfs does not support these on Windows
if (os.platform() === 'win32') { return }
if (platform === 'win32') { return }

let ipfsd
let ipfs
Expand Down

0 comments on commit 385a6c3

Please sign in to comment.