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

Commit 20f5218

Browse files
committed
Check directory contents in "get" test.
1 parent 1bdf454 commit 20f5218

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/files.js

+18
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ module.exports = (common) => {
359359
next()
360360
}
361361
}, () => {
362+
// Check paths
362363
var paths = files.map((file) => {
363364
return file.path
364365
})
@@ -374,6 +375,23 @@ module.exports = (common) => {
374375
'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/jungle.txt',
375376
'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/pp.txt',
376377
])
378+
379+
// Check contents
380+
var contents = files.map((file) => {
381+
return file.content ? file.content : null
382+
})
383+
expect(contents).to.deep.equal([
384+
null,
385+
directoryContent['alice.txt'],
386+
null,
387+
null,
388+
null,
389+
directoryContent['files/hello.txt'],
390+
directoryContent['files/ipfs.txt'],
391+
directoryContent['holmes.txt'],
392+
directoryContent['jungle.txt'],
393+
directoryContent['pp.txt'],
394+
])
377395
done()
378396
}))
379397
})

0 commit comments

Comments
 (0)