This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathinterface-message-port-client.js
177 lines (171 loc) · 4.73 KB
/
interface-message-port-client.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/* eslint-env mocha, browser */
import * as tests from 'interface-ipfs-core'
import { activate } from './util/client.js'
describe('interface-ipfs-core tests', () => {
const factory = {
spawn () {
return { api: activate() }
},
clean () {}
}
tests.root(factory, {
skip: [
{
name: 'should add with only-hash=true',
reason: 'ipfs.object.get is not implemented'
},
{
name: 'should add a directory with only-hash=true',
reason: 'ipfs.object.get is not implemented'
},
{
name: 'should add with mtime as hrtime',
reason: 'process.hrtime is not a function in browser'
},
{
name: 'should add from a URL with only-hash=true',
reason: 'ipfs.object.get is not implemented'
},
{
name: 'should cat with a Uint8Array multihash',
reason: 'Passing CID as Uint8Array is not supported'
},
{
name: 'should add from a HTTP URL',
reason: 'https://github.com/ipfs/js-ipfs/issues/3195'
},
{
name: 'should add from a HTTP URL with redirection',
reason: 'https://github.com/ipfs/js-ipfs/issues/3195'
},
{
name: 'should add from a URL with only-hash=true',
reason: 'https://github.com/ipfs/js-ipfs/issues/3195'
},
{
name: 'should add from a URL with wrap-with-directory=true',
reason: 'https://github.com/ipfs/js-ipfs/issues/3195'
},
{
name: 'should add from a URL with wrap-with-directory=true and URL-escaped file name',
reason: 'https://github.com/ipfs/js-ipfs/issues/3195'
},
{
name: 'should not add from an invalid url',
reason: 'https://github.com/ipfs/js-ipfs/issues/3195'
},
{
name: 'should be able to add dir without sharding',
reason: 'Cannot spawn IPFS with different args'
},
{
name: 'with sharding',
reason: 'TODO: allow spawning new daemons with different config'
},
{
name: 'addAll',
reason: 'Not implemented'
},
{
name: 'get',
reason: 'Not implemented'
},
{
name: 'refs',
reason: 'Not implemented'
},
{
name: 'refsLocal',
reason: 'Not implemented'
}
]
})
tests.dag(factory, {
skip: [
{
name: 'should get a dag-pb node',
reason: 'Nodes are not turned into dag-pb DAGNode instances'
},
{
name: 'should get a dag-pb node with path',
reason: 'Nodes are not turned into dag-pb DAGNode instances'
},
{
name: 'should get by CID string',
reason: 'Passing CID as strings is not supported'
},
{
name: 'should get by CID string + path',
reason: 'Passing CID as strings is not supported'
},
{
name: 'should get a node added as CIDv1 with a CIDv0',
reason: 'ipfs.block API is not implemented'
},
{
name: 'should be able to get part of a dag-cbor node',
reason: 'Passing CID as strings is not supported'
},
{
name: 'should get tree with CID and path as String',
reason: 'Passing CID as strings is not supported'
},
{
name: '.dag.export',
reason: 'Not implemented yet'
},
{
name: '.dag.import',
reason: 'Not implemented yet'
}
]
})
tests.block(factory, {
skip: [
{
name: 'should get by CID in string',
reason: 'Passing CID as strings is not supported'
},
{
name: 'should return an error for an invalid CID',
reason: 'Passing CID as strings is not supported'
},
{
name: 'should put a buffer, using CID string',
reason: 'Passing CID as strings is not supported'
},
{
name: 'should put a buffer, using options',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should remove by CID object',
reason: 'ipfs.refs.local is not implemented'
},
{
name: 'should remove by CID in string',
reason: 'Passing CID as strings is not supported'
},
{
name: 'should remove by CID in buffer',
reason: 'Passing CID as Buffer is not supported'
},
{
name: 'should error when removing pinned blocks',
reason: 'ipfs.pin.add is not implemented'
},
{
name: 'should remove multiple CIDs',
reason: 'times out'
},
{
name: 'should error when removing non-existent blocks',
reason: 'times out'
},
{
name: 'should not error when force removing non-existent blocks',
reason: 'times out'
}
]
})
})