Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 4b264e0

Browse files
committed
chore: remove commented out tests
The commented out tests are no longer applicable. The tests about getting the whole object are replaced by the "round-trip" test.
1 parent f41f760 commit 4b264e0

File tree

6 files changed

+0
-88
lines changed

6 files changed

+0
-88
lines changed

test/ipld-bitcoin.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,6 @@ module.exports = (repo) => {
132132
expect(mh.name).to.equal('sha3-512')
133133
})
134134

135-
// TODO vmx 2018-11-30: Implement getting the whole object properly
136-
// it('root path (same as get)', (done) => {
137-
// resolver.get(cid1, '/', (err, result) => {
138-
// expect(err).to.not.exist()
139-
//
140-
// ipldBitcoin.util.cid(result.value, (err, cid) => {
141-
// expect(err).to.not.exist()
142-
// expect(cid).to.eql(cid1)
143-
// done()
144-
// })
145-
// })
146-
// })
147-
148135
it('value within 1st node scope', async () => {
149136
const result = resolver.resolve(cid1, 'version')
150137
const node = await result.first()

test/ipld-dag-cbor.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,6 @@ module.exports = (repo) => {
115115
expect(mh.name).to.equal('sha3-512')
116116
})
117117

118-
// TODO vmx 2018-11-30: Implement getting the whole object properly
119-
// it('resolver.get root path', (done) => {
120-
// resolver.get(cid1, '/', (err, result) => {
121-
// expect(err).to.not.exist()
122-
//
123-
// dagCBOR.util.cid(result.value, (err, cid) => {
124-
// expect(err).to.not.exist()
125-
// expect(cid).to.eql(cid1)
126-
// done()
127-
// })
128-
// })
129-
// })
130-
131118
it('resolver.get value within 1st node scope', async () => {
132119
const result = resolver.resolve(cid1, 'someData')
133120
const node = await result.first()

test/ipld-dag-pb.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,6 @@ module.exports = (repo) => {
144144
expect(mh.name).to.equal('sha3-512')
145145
})
146146

147-
// TODO vmx 2018-11-29: Change this test to use the new `get()`
148-
// it('resolver.get with empty path', (done) => {
149-
// resolver.get(cid1, '/', (err, result) => {
150-
// expect(err).to.not.exist()
151-
//
152-
// dagPB.util.cid(result.value, (err, cid) => {
153-
// expect(err).to.not.exist()
154-
// expect(cid).to.eql(cid1)
155-
// done()
156-
// })
157-
// })
158-
// })
159-
160147
it('resolves()s a value within 1st node scope', async () => {
161148
const result = resolver.resolve(cid1, 'Data')
162149
const node = await result.first()
@@ -202,16 +189,6 @@ module.exports = (repo) => {
202189
expect(node).to.deep.equal(node1)
203190
})
204191

205-
// TODO vmx 2018-11-29: Think about if every returned node should contain
206-
// a `cid` field or not
207-
// it('resolver.get value within nested scope (1 level) returns cid of node traversed to', (done) => {
208-
// resolver.get(cid2, 'Links/0/Hash/Data', (err, result) => {
209-
// expect(err).to.not.exist()
210-
// expect(result.cid).to.deep.equal(cid1)
211-
// done()
212-
// })
213-
// })
214-
215192
it('resolver.remove', async () => {
216193
// TODO vmx 2018-12-12: The same repo is used for all tests, there
217194
// seems to be some race condition with inserting and removing items.

test/ipld-eth-block.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,6 @@ module.exports = (repo) => {
8787
expect(mh.name).to.equal('keccak-512')
8888
})
8989

90-
// TODO vmx 2018-11-30: Implement getting the whole object properly
91-
// it('root path (same as get)', (done) => {
92-
// resolver.get(cid1, '/', (err, result) => {
93-
// expect(err).to.not.exist()
94-
//
95-
// ipldEthBlock.util.cid(result.value, (err, cid) => {
96-
// expect(err).to.not.exist()
97-
// expect(cid).to.eql(cid1)
98-
// done()
99-
// })
100-
// })
101-
// })
102-
10390
it('value within 1st node scope', async () => {
10491
const result = resolver.resolve(cid1, 'number')
10592
const node = await result.first()

test/ipld-git.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,6 @@ module.exports = (repo) => {
181181
expect(mh.name).to.equal('sha3-512')
182182
})
183183

184-
// TODO vmx 2018-11-30: Implement getting the whole object properly
185-
// it('resolver.get empty path', (done) => {
186-
// resolver.get(blobCid, '', (err, result) => {
187-
// expect(err).to.not.exist()
188-
//
189-
// ipldGit.util.cid(result.value, (err, cid) => {
190-
// expect(err).to.not.exist()
191-
// expect(cid).to.eql(blobCid)
192-
// done()
193-
// })
194-
// })
195-
// })
196-
197184
it('value within 1st node scope', async () => {
198185
const result = resolver.resolve(commitCid, 'message')
199186
const node = await result.first()

test/ipld-zcash.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,6 @@ module.exports = (repo) => {
135135
expect(mh.name).to.equal('sha3-512')
136136
})
137137

138-
// // TODO vmx 2018-11-30: Implement getting the whole object properly
139-
// it('root path (same as get)', (done) => {
140-
// resolver.get(cid1, '/', (err, result) => {
141-
// expect(err).to.not.exist()
142-
//
143-
// ipldZcash.util.cid(result.value, (err, cid) => {
144-
// expect(err).to.not.exist()
145-
// expect(cid).to.eql(cid1)
146-
// done()
147-
// })
148-
// })
149-
// })
150-
151138
it('value within 1st node scope', async () => {
152139
const result = resolver.resolve(cid1, 'version')
153140
const node = await result.first()

0 commit comments

Comments
 (0)