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

Commit e2168ed

Browse files
committed
fix: adds skips for #339
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 59dff83 commit e2168ed

File tree

2 files changed

+32
-11
lines changed

2 files changed

+32
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"bs58": "^4.0.1",
3232
"cids": "~0.5.3",
3333
"concat-stream": "^1.6.2",
34-
"detect-node": "^2.0.3",
3534
"flatmap": "0.0.3",
3635
"glob": "^7.1.2",
3736
"ipfs-block": "~0.7.1",
@@ -75,6 +74,7 @@
7574
"browser-process-platform": "~0.1.1",
7675
"chai": "^4.1.2",
7776
"cross-env": "^5.1.6",
77+
"detect-node": "^2.0.3",
7878
"dirty-chai": "^2.0.1",
7979
"eslint-plugin-react": "^7.9.1",
8080
"go-ipfs-dep": "~0.4.15",

test/interface.spec.js

+31-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
'use strict'
33

44
const tests = require('interface-ipfs-core')
5+
const isNode = require('detect-node')
56
const CommonFactory = require('./utils/interface-common-factory')
67
const IPFSApi = require('../src')
78

@@ -18,7 +19,7 @@ describe('interface-ipfs-core tests', () => {
1819
skip: [
1920
// dag.tree
2021
//
21-
// FIXME vmx 2018-02-22: Currently the tree API is not exposed in go-ipfs
22+
// TODO vmx 2018-02-22: Currently the tree API is not exposed in go-ipfs
2223
'tree',
2324
// dag.get:
2425
//
@@ -40,17 +41,14 @@ describe('interface-ipfs-core tests', () => {
4041
tests.dht(defaultCommonFactory, {
4142
skip: [
4243
// dht.findpeer
43-
//
4444
// FIXME checking what is exactly go-ipfs returning
4545
// https://github.com/ipfs/go-ipfs/issues/3862#issuecomment-294168090
4646
'should fail to find other peer if peer does not exist',
4747
// dht.findprovs
48-
//
4948
// FIXME go-ipfs endpoint doesn't conform with the others
5049
// https://github.com/ipfs/go-ipfs/issues/5047
5150
'should provide from one node and find it through another node',
5251
// dht.get
53-
//
5452
// FIXME go-ipfs errors with Error: key was not found (type 6)
5553
// https://github.com/ipfs/go-ipfs/issues/3862
5654
'should get a value after it was put on another node'
@@ -59,14 +57,25 @@ describe('interface-ipfs-core tests', () => {
5957

6058
tests.files(defaultCommonFactory, {
6159
skip: [
60+
// files.add
61+
// FIXME https://github.com/ipfs/js-ipfs-api/issues/339
62+
isNode ? null : 'should add a nested directory as array of tupples',
63+
isNode ? null : 'should add a nested directory as array of tupples with progress',
64+
// files.addPullStream
65+
// FIXME https://github.com/ipfs/js-ipfs-api/issues/339
66+
isNode ? null : 'should add pull stream of valid files and dirs',
67+
// files.addReadableStream
68+
// FIXME https://github.com/ipfs/js-ipfs-api/issues/339
69+
isNode ? null : 'should add readable stream of valid files and dirs',
6270
// files.catPullStream
63-
//
64-
// FIXME not implemented in go-ipfs yet
71+
// TODO not implemented in go-ipfs yet
6572
'should export a chunk of a file',
6673
'should export a chunk of a file in a Pull Stream',
67-
'should export a chunk of a file in a Readable Stream'
68-
],
69-
only: true
74+
'should export a chunk of a file in a Readable Stream',
75+
// files.get
76+
// FIXME https://github.com/ipfs/js-ipfs-api/issues/339
77+
isNode ? null : 'should get a directory'
78+
]
7079
})
7180

7281
tests.generic(CommonFactory.create({
@@ -76,7 +85,19 @@ describe('interface-ipfs-core tests', () => {
7685

7786
tests.key(defaultCommonFactory)
7887

79-
tests.ls(defaultCommonFactory)
88+
tests.ls(defaultCommonFactory, {
89+
skip: [
90+
// lsPullStream
91+
// FIXME https://github.com/ipfs/js-ipfs-api/issues/339
92+
isNode ? null : 'should pull stream ls with a base58 encoded CID',
93+
// lsReadableStream
94+
// FIXME https://github.com/ipfs/js-ipfs-api/issues/339
95+
isNode ? null : 'should readable stream ls with a base58 encoded CID',
96+
// ls
97+
// FIXME https://github.com/ipfs/js-ipfs-api/issues/339
98+
isNode ? null : 'should ls with a base58 encoded CID'
99+
]
100+
})
80101

81102
tests.object(defaultCommonFactory)
82103

0 commit comments

Comments
 (0)