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

Commit 385a6c3

Browse files
committedMar 10, 2018
fix: disable Browser test on Windows
`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.
1 parent 1a0d6a9 commit 385a6c3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

Diff for: ‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
},
6767
"devDependencies": {
6868
"aegir": "^13.0.6",
69+
"browser-process-platform": "^0.1.1",
6970
"chai": "^4.1.2",
7071
"cross-env": "^5.1.3",
7172
"dirty-chai": "^2.0.1",

Diff for: ‎test/diag.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const chai = require('chai')
55
const dirtyChai = require('dirty-chai')
66
const expect = chai.expect
77
chai.use(dirtyChai)
8-
const os = require('os')
8+
const platform = require('browser-process-platform')
99

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

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

1919
let ipfsd
2020
let ipfs

0 commit comments

Comments
 (0)