Skip to content

Commit 22590cb

Browse files
richardschneiderdaviddias
authored andcommitted
fix: more windows interop (#147)
* test: run all tests on node * chore: run on appveyor * chore: get circleci working * chore: browser tests are timing out on circle CI * chore: travis is now timing out * test: run without global timeout
1 parent 3a44e56 commit 22590cb

File tree

6 files changed

+13
-23
lines changed

6 files changed

+13
-23
lines changed
File renamed without changes.

circle.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ dependencies:
1010
pre:
1111
- google-chrome --version
1212
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
13+
- for v in $(curl http://archive.ubuntu.com/ubuntu/pool/main/n/nss/ | grep "href=" | grep "libnss3.*deb\"" -o | grep -o "libnss3.*deb" | grep "3.28" | grep "14.04"); do curl -L -o $v http://archive.ubuntu.com/ubuntu/pool/main/n/nss/$v; done && rm libnss3-tools*_i386.deb libnss3-dev*_i386.deb
1314
- sudo dpkg -i google-chrome.deb || true
15+
- sudo dpkg -i libnss3*.deb || true
1416
- sudo apt-get update
17+
- sudo apt-get install -f || true
18+
- sudo dpkg -i libnss3*.deb
1519
- sudo apt-get install -f
1620
- sudo apt-get install --only-upgrade lsb-base
1721
- sudo dpkg -i google-chrome.deb

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"lodash": "^4.17.4",
4949
"memdown": "^1.4.1",
5050
"multihashes": "~0.4.12",
51+
"multihashing-async": "^0.4.7",
5152
"ncp": "^2.0.0",
5253
"pre-commit": "^1.2.2",
5354
"rimraf": "^2.6.2"

test/datastore-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module.exports = (repo) => {
5454
cb()
5555
})
5656
}), done)
57-
})
57+
}).timeout(10 * 1000)
5858
})
5959

6060
describe('.has', () => {

test/interop-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Key = require('interface-datastore').Key
1010
const map = require('async/map')
1111

1212
module.exports = (repo) => {
13-
describe.only('interop', () => {
13+
describe('interop', () => {
1414
it('reads welcome-to-ipfs', (done) => {
1515
const welcomeHash = mh.fromHexString(
1616
'1220120f6af601d46e10b2d2e11ed71c55d25f3042c22501e41d1246e7a1e9d3d8ec'

test/node.js

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,18 @@ const ncp = require('ncp').ncp
55
const rimraf = require('rimraf')
66
const path = require('path')
77
const series = require('async/series')
8-
const os = require('os')
98
const chai = require('chai')
109
chai.use(require('dirty-chai'))
11-
const expect = chai.expect
1210

1311
const IPFSRepo = require('../src')
1412

1513
describe('IPFS Repo Tests on on Node.js', () => {
1614
require('./options-test')
1715

1816
const repos = [{
19-
name: 'default',
17+
name: 'default inited',
2018
opts: undefined,
21-
init: false
19+
init: true
2220
}, {
2321
name: 'memory',
2422
opts: {
@@ -27,6 +25,10 @@ describe('IPFS Repo Tests on on Node.js', () => {
2725
lock: 'memory'
2826
},
2927
init: true
28+
}, {
29+
name: 'default existing',
30+
opts: undefined,
31+
init: false
3032
}]
3133
repos.forEach((r) => describe(r.name, () => {
3234
const testRepoPath = path.join(__dirname, 'test-repo')
@@ -55,23 +57,6 @@ describe('IPFS Repo Tests on on Node.js', () => {
5557
], done)
5658
})
5759

58-
it('init', (done) => {
59-
const dir = path.join(os.tmpdir(), String(Math.random()).slice(2))
60-
const r = new IPFSRepo(dir)
61-
62-
series([
63-
(cb) => r.init({hello: 'world'}, cb),
64-
(cb) => r.open(cb),
65-
(cb) => r.config.get((err, val) => {
66-
expect(err).to.not.exist()
67-
expect(val).to.be.eql({hello: 'world'})
68-
cb()
69-
}),
70-
(cb) => r.close(cb),
71-
(cb) => rimraf(dir, cb)
72-
], done)
73-
})
74-
7560
require('./repo-test')(repo)
7661
require('./blockstore-test')(repo)
7762
require('./datastore-test')(repo)

0 commit comments

Comments
 (0)