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

Commit 09a1029

Browse files
committed
Check directory contents in "get" test.
1 parent 765b2ee commit 09a1029

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/files.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ module.exports = (common) => {
360360
next()
361361
}
362362
}, () => {
363+
// Check paths
363364
var paths = files.map((file) => {
364365
return file.path
365366
})
@@ -375,6 +376,23 @@ module.exports = (common) => {
375376
'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/jungle.txt',
376377
'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/pp.txt',
377378
])
379+
380+
// Check contents
381+
var contents = files.map((file) => {
382+
return file.content ? file.content : null
383+
})
384+
expect(contents).to.deep.equal([
385+
null,
386+
directoryContent['alice.txt'],
387+
null,
388+
null,
389+
null,
390+
directoryContent['files/hello.txt'],
391+
directoryContent['files/ipfs.txt'],
392+
directoryContent['holmes.txt'],
393+
directoryContent['jungle.txt'],
394+
directoryContent['pp.txt'],
395+
])
378396
done()
379397
}))
380398
})

0 commit comments

Comments
 (0)