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

Commit

Permalink
Check directory contents in "get" test.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackergrrl committed Jun 23, 2016
1 parent 7d28a31 commit 520f544
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ module.exports = (common) => {
next()
}
}, () => {
// Check paths
var paths = files.map((file) => {
return file.path
})
Expand All @@ -374,6 +375,23 @@ module.exports = (common) => {
'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/jungle.txt',
'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP/pp.txt',
])

// Check contents
var contents = files.map((file) => {
return file.content ? file.content : null
})
expect(contents).to.deep.equal([
null,
directoryContent['alice.txt'],
null,
null,
null,
directoryContent['files/hello.txt'],
directoryContent['files/ipfs.txt'],
directoryContent['holmes.txt'],
directoryContent['jungle.txt'],
directoryContent['pp.txt'],
])
done()
}))
})
Expand Down

0 comments on commit 520f544

Please sign in to comment.